Skip to main content

Bug Tracker

Side navigation

#12654 closed bug (notabug)

Opened October 04, 2012 06:44PM UTC

Closed October 04, 2012 07:00PM UTC

Last modified October 04, 2012 07:02PM UTC

DatePicker random dates not valid

Reported by: dunlaps@gamma-dynacare.com 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

};

} ();

Attachments (0)
Change History (2)

Changed October 04, 2012 07:00PM UTC by mikesherov comment:1

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!

Changed October 04, 2012 07:02PM UTC by scottgonzalez comment:2

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