Telerik Extensions for ASP.NET MVC

Version Q1 2012, released 04/19/2012

Date parsing

Open the calendar

About this example ASPXRazor

This example shows DatePicker abilities to parse input value depending on given server date format or predefined words.

DatePicker uses the default date format provided from server to parse the input. The parsing starts when input looses its focus or user clicks "Enter" button. If the value cannot be parsed an error state class is added to the input.

Other feature of the datepicker parsing is the ability to generate date depending on predified words. The available combinations are:

  • "Today", which will be parsed as today's date.
  • "Yesterday", which will be parsed as one day before today.
  • "Tomorrow", which will be parsed as one day after today.
  • Day of the week : The parsed date will corresponds to the typed day of the week.
  • Month of the year: The parsed date will corresponds to the typed month of the year. Tha day of the month will be today's one.
  • "Next" or "Last" words can be used in combination with the aforementioned ones as well as with the "day", "week", "month" and "year".

If you need to localize the predefined words you should provide own $.telerik.cultureInfo object, which contains localized definitions for "today", "tomorrow" and etc.

Get more than expected!

Take the Telerik Extensions for ASP.NET MVC to your Visual Studio projects to truly experience their power. Download your free copy now and jumpstart your development with the available learning resources.

The Extensions are offered in both open source and commercial versions the differences between which are well explained in the licensing FAQ.

If you have any questions, do not hesitate to contact us at sales@telerik.com.

Other Demos: