Closed poldixd closed 10 years ago
From what I can tell, this seems to be an issue with jquery ui. What version are you using?
I had the same issue. You need to match the value of 'dateFormat' with the dates you provide to the picker at instantiation. In your case, the minDate and maxDate need to be strings in 'dd.mm.yy' format
I have the same issue and I have no minDate or maxDate and I follow to my format when I set initial value. Version is "jQuery UI - v1.10.4 - 2014-01-17".
Html: <input class="text-box single-line hasDatepicker" data-val="true" data-val-date="The field Target Close Date must be a date." id="Issue_CloseDate" name="Issue.CloseDate" type="text" value="31/05/2015">
datepicker dafaults: $.datepicker.setDefaults({ dateFormat: 'dd/mm/yy' });
EXCEPTION: when I call next method $.datepicker.parseDate('dd/mm/yy', "999/05/2015"); then it raises the following exception: "Uncaught Unexpected literal at position 2"
Any recommended solution on this issue?
your code.
$(function() {
$('#result').multiDatesPicker({
mode: 'daysRange',
dateFormat: 'dd.mm.yy',
minDate: new Date(2012, 12, 24),
maxDate: new Date(2012, 12, 30),
autoselectRange: [0,3]
});
});
-------------------------modify code-----------
$(function() {
$('#result').multiDatesPicker({
mode: 'daysRange',
dateFormat: 'yy.mm.dd',
// min or max Date Formet == yy.mm.dd
// your dateFormat [dd.mm.yy] ---> [yy.mm.dd] modify
minDate: new Date(2012, 12, 24),
maxDate: new Date(2012, 12, 30),
autoselectRange: [0,3]
});
});
Hello,
if i set the dateFormat to the german format 'dd.mm.yy' and the mode to 'daysRange', the following Exception were thrown by the console:
Here is the code:
is this a bug from the jquery-ui.multidatespicker.js or the jquer ui?
I need the german format!
greetings from Berlin!