jQuery UI Datepicker and Google Chrome not working
        Posted  
        
            by zA
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by zA
        
        
        
        Published on 2010-02-16T09:41:06Z
        Indexed on 
            2010/03/24
            1:23 UTC
        
        
        Read the original article
        Hit count: 636
        
uidatepicker
|chrome
Hi,
I'm having some problems with jQueryUI Datepicker and Google Chrome. My datepicker is working as expected with IE8, Firefox and Safari. The problem is when clicking the datepicker connected textbox in Chrome. It gives me a crash page, "Oops, an error occurred...". On my page there's textbox with a datepicker. The datepicker is language dependent and it loads the correct language settings dynamically. The datepicker should also display the month and year dropdowns. The code is as follows
 
$(function() {
$.datepicker.setDefaults($.extend({ changeMonth: true, changeYear: true }, $.datepicker.regional['']));
$('#<%= TextBoxBirthDate.ClientID %>').datepicker($.datepicker.regional[$('#LabelRegionalSettings').val()]);});
If I only extend the datepicker with one option, i.e. changeYear, it works in Chrome. But if I add another option, i.e. changeMonth, the 'crash' in Chrome occurs.
Is my code incorrect? If so, how do I fix it?
Any help is greatly appreciated!
© Stack Overflow or respective owner