We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Calander control - pre set formats

Thread ID:

Created:

Updated:

Platform:

Replies:

78810 Jan 1,2009 11:31 PM UTC Jan 2,2009 08:37 AM UTC ASP.NET Web Forms (Classic) 1
loading
Tags: GridGroupingControl
prasanna
Asked On January 1, 2009 11:31 PM UTC

Hi,
I am using calander control. I would like to set the formats of the date. if i set mm/dd/yyyy even then i am assigning DateTime it should trim the DateTime and just assign only the preset Date Format which is mm/dd/yyyy

Regard,
Prasanna


Rekha P [Syncfusion]
Replied On January 2, 2009 08:37 AM UTC

Hi Prasanna,

Thank you for your interest in Syncfusion Products.

The DropDownCalendar control offers various pre-defined formats, in which the date-time values can be displayed, by setting the required option to the Format property which represents the date-time format of the control with the options of Long, Short, Time, CustomChar and CustomString. In order to set the date format as MM/dd/yyyy, please refer the code snippet below.

[ASPX]

Format="CustomString"
CustomFormat="MM/dd/yyyy">


For Calendar control, the date format 'MM/dd/yyyy' can be set as,

TextBox1.Text = Calendar1.SelectedDate.ToShortDateString();

Also please refer the sample files below to achieve this.

http://websamples.syncfusion.com/samples/Grid.Web/6.4.0.15/F78810-Calendar/Grid_Web_CalendarFormat.zip

Please let me know if this helps you.

Thanks,
Rekha


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;