Have a complex view model with nested models and can't get the real PropertyName from
ViewData.ModelMetadata.PropertyName
use
ViewData.TemplateInfo.HtmlFieldPrefix
ahh but this returns parentmodel.propertyName
so
ViewData.TemplateInfo.HtmlFieldPrefix.Replace(".","_")
done.
jquery date picker example:
$(document).ready(function() {
$('#').datepicker({ yearRange: '-120:+5', dateFormat: 'dd/mm/yy', changeMonth: true, changeYear: true });
});
No comments:
Post a Comment