Click here to Skip to main content
15,904,155 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi All,

I am using vs2008,asp.net and c#.net

how to set date format in ajax calender using asp.net.

i need dd/MM/yyyy date format for display in calender and same in MM/dd/yyyy for query while i pass the date value.

dd/MM/yyyy for display
MM/dd/yyyy for date value in same calender control


plz give suggestion.......

Regards
mukesh
Posted
Comments
m@dhu 1-May-12 2:49am    
Use Format="dd/MM/yyyy" property to display as required and convert to MM/dd/yyyy while querying.
mukesh_panth 1-May-12 3:46am    
hi,

for dd/MM/yyyy format date is show 01/05/2012
after convert MM/dd/yyyy date is convert to 1/5/2012 means 1 is month, 5 is date and 2012 is yrs..

how can convert MM/dd/yyyy (05/01/2012)format using ajax calender.


1 solution

Hi The below should answer your question



VB
<ajaxToolkit:Calendar runat="server"
    TargetControlID="Date1"
    Format="dd/MM/YYYY, yyyy"
    PopupButtonID="Image1" />
 
Share this answer
 
Comments
Mohamed Mitwalli 1-May-12 4:15am    
5+

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