Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DataType.Date
Message
From
30/08/2012 12:04:42
 
 
To
30/08/2012 11:53:35
General information
Forum:
ASP.NET
Category:
MVC
Title:
Environment versions
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01551951
Message ID:
01552005
Views:
39
I'd use the JQuery UI calendar. It's so easy to add

>For the editor for your Dates, add a UIHint:
>
[UIHint("MyDateTimeTemplate")]
>
>Then create an editor template for it with the same name. For example:
>
@model DateTime?
>
>@Html.TextBox("", (Model.HasValue ? Model.Value.ToShortDateString() : string.Empty)) 
>< script type="text/javascript">
>	$("#@ViewData.ModelMetadata.PropertyName").datepicker({ dateFormat: 'mm/dd/yy' });
>< /script>
>
>As for defining a new class for the dropdown, I believe that is unnecessary. Providing the display field name and value field name should be enough to only include those in the resulting html.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform