$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
Picker Formatting Values in ASP.NET
Home > How to > Calendar Picker's Formatting Values

Information for Picker Formatting Values for ASP.NET

Generally speaking, the DatePicker, TimePicker, and DateTimePicker controls implemented within web page by using the Kettic Calendar UI library adopt the system locale settings to set and display the format date and time values. However, with the rich options for date and time formatting values, we are able to override and reset any of the default formats with the support of DateInput, Calendar, and TimeView controls within ASP.NET application.
Here is the brief navigation for this formatting values guide page:
  • ASP.NET and C# sample codes for formatting values in Calendar
  • ASP.NET and C# sample codes for formatting values in TimeView
  • ASP.NET and C# sample codes for formatting values in DateInput

Formatting in Calendar

Kettic Calender UI for ASP.NET AJAX control is presented in DatePicker and DateTimePicker. And there are two supportable properties that we can use to set and define the format of dates: TitleFormat property for users to specify the format of the date that displays in the title bar and DayToolFormat attribute to customize the format of the date.
Please check following ASPX.NET demo codes for formatting calendar.

<kettic:PerDatePicker ID="PerDateTimePicker1" runat="server"
&lt;Calendar ID="Calendar1"
CellDayFormat="d"
DayCellToolTipFormat="yyyy MMM d”
TitleFormat="
MMM yy">
</Calendar>
</kettic:PerDatePicker>
Please refer to following C# code to set the format in calendar.

PerDatePicker1.Calendar.CellDayFormat = "d";
PerDatePicker1.Calendar.DayCellToolTipFormat = "yyyy MMM d";
PerDatePicker1.Calendar.TitleFormat = "MMM yy";

Formatting in TimeView

PerTimeView control of Calender UI for ASP.NET AJAX is available for both TimePicker and DateTimePicker controls. The valid value of TimeFormat property decides how it displays the time values and it is fully user-defined.
Please following ASP.NET codes for set the format in TimeView.

<kettic:PerTimePicker ID="PerTimePicker1" runat="server">
<TimeView TimeFormat="HH:mm:tt"></TimeView>
</kettic:PerTimePicker>
Following is the C# sample code to set the format in TimeView.

PerTimePicker1.TimeView.TimeFormat = "HH:mm:tt";

Formatting in DateInput

Directly copy and paste following ASPX.NET codes to customize the format in Dateput.

<kettic:PerDateTimePicker ID="PerDateTimePicker1" runat="server">
<DateInput DateFormat="M/d/yyyy hh:mm:tt" DisplayDateFormat="MMMM d,yyyy h:mm t" ></DateInput>
</kettic:PerDateTimePicker>
C# sample codes for defining format in Dateput for C# users.

PerDateTimePicker1.DateInput.DateFormat = "M/d/yyyy hh:mm:tt";
PerDateTimePicker1.DateInput.DisplayDateFormat = "MMMM d,yyyy h:mm t";

More Tutorials for Calendar UI for ASP.NET AJAX

ASP.NET AJAX UI Controls