我是MVC3的新手--我不明白为什么日期格式验证在客户端不起作用,也就是说,如果我手动更改文本框并输入无效的格式日期。我对这个字段使用了jQuery日期选择器。奇怪的是,所需的字段验证正在工作。
有人能告诉我这段代码出了什么问题吗?
谢谢!
视图模型
[DisplayFormat(DataFormatString = "{0:d}", ApplyFormatInEditMode = true)]
[DataType(DataType.Date, ErrorMessage="Please enter a valid date in the format d
我为我当前的项目编写了一个非常简单的函数,名为insidelabel(),让我在输入中添加输入字段的描述(标签)。
//Label inside of inputfields
function insidelabel(selector, name) {
$(selector).val(name);
$(selector).css({'color':'#999'});
$(selector).focus(function () {
//Input Value
if ($(this).val() == nam