Bug Tracker

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#12654 closed bug (notabug)

DatePicker random dates not valid

Reported by: dunlaps@… Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.8.2
Keywords: Cc:
Blocked by: Blocking:

Description

Here is my configuration:

$('.date').datepicker('option', $.datepicker.regional[gdml.culture.getCulture()]);

$('.date').datepicker({

changeYear: true, changeMonth: true, yearRange: 'c-100:c+100', dateFormat: gdml.culture.getDateFormat(), minDate: new Date(1900, 01, 01), maxDate: '+0d'

});

I'm using the DatePicker with French locale. Picking random dates invalidates sometimes. For example, 08/16/1920 is not valid but 08/24/1920 is ???

This is extremely random with no specific date giving issues.

getDateFormat comes from custom code:

var gdml = gdml
{ };

gdml.culture = function () {

var cultureName = "",

setCulture = function (name) {

cultureName = name;

}, getCulture = function () {

return cultureName;

}, isFrenchLocale = function () {

return cultureName.toLowerCase() == "fr";

}, isEnglishLocale = function () {

return !isFrenchLocale();

}, dateFormat = 'mm/dd/yy', getDateFormat = function () {

return dateFormat;

}, setDateFormat = function (value) {

dateFormat = value;

};

return {

setCulture: setCulture, getCulture: getCulture, isFrenchLocale: isFrenchLocale, isEnglishLocale: isEnglishLocale, getDateFormat: getDateFormat, setDateFormat: setDateFormat

};

} ();

Change History (2)

comment:1 Changed 7 years ago by mikesherov

Resolution: notabug
Status: newclosed

Thanks for contributing! Please report this to the http://bugs.jqueryui.com bug tracker, as this is only for reporting bugs in core jQuery. Thanks!

comment:2 Changed 7 years ago by scottgonzalez

Please make sure to include a reduced test case using jsbin or jsFiddle before posting the bug against jQuery UI.

Note: See TracTickets for help on using tickets.