views:

36

answers:

0

when i set a custom yearRange for my datepicker (ie. +- 100 years), during the focusin event on the datepicker input field, a page flicker occurs. also, when changing the month/year inside the datepicker gui, the datepicker flickers.

i think it is because more than +-20 years in the datepicker yearRange is maybe too much DOM for the datepicker to generate, but i am not 100% of this. i do know that below +-20 years in the dateRange, this flicker does not occur.

here is my datepicker code:

            // add datepicker
   var today = new Date();
   $('companyVarDate').datepicker({
    changeMonth: true,
    changeYear: true,
    dateFormat: 'yy-mm-dd',
    yearRange: (today.getFullYear() - 100) + ':' + (today.getFullYear() + 100)
   }); 

is there any way to fix this flicker? thanks!