I'm trying to set default value for text input, but when doing this
<input type="text" id="dateTo" name="to" class="datepick" value="@DateTime.Now.ToString("yyyy-mm-dd")" />
i'm getting some like this 2015-41-26
and when i'm set jquery picker time format like this
$(function () {
$(".datepick").datepicker({ gotoCurrent: true, dateFormat: "yy-mm-dd", firstDay: 1 });
});
date format - like a this 2015-01-26 (TG with correct date)
How to solve both piece of one problem with datepicker.
save-asfrom your browser of the page's raw HTML and stick it in a JSFiddle? That will help testing the date-picker problem (please fix themm => MMfirst)