javascript - MVC & jQuery DatePicker - Remove Date Pattern -


i'm struggling datepicker voodoo , can't seem crack it.

given model date field like:

[display(name = "mydate", description = "please provide date")] [datatype(datatype.date)] [required(errormessage = "you need specify date")] [displayformat(nulldisplaytext = "")] public datetime? mydate { get; set; } 

i have editor template:

@model datetime? @{     @html.textbox("", (model.hasvalue ? model.value.tostring("d") : string.empty), new { @class = "datefield date-editor", type = "date" }) } 

the date pickers setup following jquery:

    $('.date-editor').datepicker({         changemonth: true,         changeyear: true,         dateformat: 'yy-mm-dd',         yearrange: '-100:+0',         defaultdate: '',         autosize: true     }); 

how prevent textbox containing pattern? date field in ui contains following string:

dd/mm/yyy 


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -