Mercurial > altnet-hispano
diff Agendas/trunk/src/Agendas.Web/Views/Shared/EditorTemplates/DateTime.cshtml @ 150:19bab30521da
Pasando DateTime a un EditorTemplates
author | Nelo@Guinea.neluz.int |
---|---|
date | Tue, 02 Aug 2011 23:24:19 -0300 |
parents | |
children | ea85bd893247 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Agendas/trunk/src/Agendas.Web/Views/Shared/EditorTemplates/DateTime.cshtml Tue Aug 02 23:24:19 2011 -0300 @@ -0,0 +1,7 @@ +@model DateTime? +<script type="text/javascript"> + $(document).ready(function () { + $("#@ViewData.TemplateInfo.GetFullHtmlFieldId(string.Empty)").datepicker({ dateFormat: 'dd-mm-yy' }); + }); +</script> +@Html.TextBox(string.Empty, (Model.HasValue ? Model.Value.ToShortDateString() : string.Empty))