Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
All-Star
20912 Points
3279 Posts
Oct 19, 2011 03:35 PM|LINK
See the example of use of the DateTimeFor here: BinariesWithSimpleExamples
Basically:
@{var DT = DateTimeFor(m => m.ExpiryDate, dateInCalendar : true)}
@DT.DateCalendar( inLine: false, calendarOptions: new CalendarOptions { ChangeYear=true, ChangeMonth=true, },
containerHtmlAttributes: new Dictionary<string, object> {{"class", "expirydate"}})
There are various calendar option you can choose....I put the ones I like more
I have chosen to use the jQuery picker, so you have to include the relateive js files, and css
francesco ab...
All-Star
20912 Points
3279 Posts
Re: Custom DateTime Validation for MVC 3 unobtrusive client side validation
Oct 19, 2011 03:35 PM|LINK
See the example of use of the DateTimeFor here: BinariesWithSimpleExamples
Basically:
@{var DT = DateTimeFor(m => m.ExpiryDate, dateInCalendar : true)}
containerHtmlAttributes: new Dictionary<string, object> {{"class", "expirydate"}})Mvc Controls Toolkit | Data Moving Plug-in Videos