Click here to Skip to main content
15,902,834 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Rangevalidator by default accept Date Format like this mm/dd/yyyy ..how can i change this to dd-MMM-yyyy format to set min date and max date for calender user control

How to change the format of Range Validator?
Posted

You can use Custom DateTime Range Validator. Example:
Click
 
Share this answer
 
Please try by setting a culture to the calender control. Use the following code to create the culture object. Set this object to the calender control and check.


CultureInfo ci = new CultureInfo("en-us", false);<br />
ci.DateTimeFormat.ShortDatePattern = "dd-MMM-yyyy";<br />
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900