How to I set the text value of the webdatechooser to return mm/dd/yyyy not m/d/yyyy.
Viktor,
Thank you for your help. For this part of the project I will probably just use some standard drop down boxes and concatenate the string in the back-side into the date I need for the database.
Thank you!
T.J.
Hi T.J.
Unfortunately WebDateChooser supports only "3 fields" format and MMM/MMMM is not supported in edit mode, but only M/MM.
Usha Gavara said: You can explicitly format WebDateChooser using CultureInfo class.This can be done using the following code snippet: this.WebDateChooser1.Format = Infragistics.WebUI.WebSchedule.DateFormat.Short;System.Globalization.CultureInfo c = new System.Globalization.CultureInfo("en-US"); c.DateTimeFormat.DateSeparator = "/";c.DateTimeFormat.ShortDatePattern = "MM/dd/yyyy"; this.WebDateChooser1.CalendarLayout.Culture = c;
You can explicitly format WebDateChooser using CultureInfo class.This can be done using the following code snippet:
this
c.DateTimeFormat.DateSeparator =
I have used this code to set-up my Web Date Chooser to only Display the Month and Year values (as requested by my users), by setting the format = "MMM, yyyy".
I was wondering if there is a way that I can change the Calendar dispaly for the Web Date Chooser, so that only the Month and Year are displayed when the drop down is selected. Instead of seeing a full calendar with all the individual days, I would rather just see a Month and Year value.
The value saved to the database would then just be the 1st day of the month. So if the user selected "Feb., 2009", then the database would save the value as 2/1/2009 00:00:00 AM.
Is this possible?
Thank you for your help!
this.WebDateChooser1.Format = Infragistics.WebUI.WebSchedule.DateFormat.Short;
c.DateTimeFormat.DateSeparator = "/";
this.WebDateChooser1.CalendarLayout.Culture = c;