Click here to Skip to main content
15,896,915 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello sir,
i am working on datepicker with various cultures and i use this format "MM dd, yy" (July 04, 2015)
but i am stop at czech-republic culture for get date selected in datepicker
i got all months date as a selected in datepicker but in july (cervenec) month
which date i select its not set as selected
if i changed month name (cervenec to "xyz") then its worked and show me date as a selected in datepicker

in my jquery the format for czech republic i can show you

VB
jQuery(function ($) {
    $.datepicker.regional['cs'] = {
        closeText: 'Zavřít',
        prevText: '<Dříve',
        nextText: 'Později>',
        currentText: 'Nyní',
        monthNames: ['leden', 'únor', 'březen', 'duben', 'květen', 'červen',
        'červenec', 'srpen', 'září', 'říjen', 'listopad', 'prosinec'],
        monthNamesShort: ['led', 'úno', 'bře', 'dub', 'kvě', 'čer',
        'čvc', 'srp', 'zář', 'říj', 'lis', 'pro'],
        dayNames: ['neděle', 'pondělí', 'úterý', 'středa', 'čtvrtek', 'pátek', 'sobota'],
        dayNamesShort: ['ne', 'po', 'út', 'st', 'čt', 'pá', 'so'],
        dayNamesMin: ['ne', 'po', 'út', 'st', 'čt', 'pá', 'so'],
        weekHeader: 'Týd',
        dateFormat: 'dd. mm. yy',
        firstDay: 1,
        isRTL: false,
        showMonthAfterYear: false,
        yearSuffix: ''
    };
    $.datepicker.setDefaults($.datepicker.regional['cs']);
});

if you have any about this issue then pls help me to solve this issue
thanks.
Posted
Comments
Sreekanth Mothukuru 6-Jul-15 3:23am    
What is the code or snippet you used to set the selected month to july..
Manish Dalwadi 6-Jul-15 3:37am    
Sir,
i already mentioned above that for czech republic
which format i used ("MM dd, yy" (July 04, 2015))
and i am using datepicker in normal forms and also in gridview
for every cultures its works fine, and also works fine in czech republic except "july" month.
in july month which date i am trying to select, its displayed in textbox fine, but its not selected in datepicker and its only happened for july(cervenec) month. i am really sorry for badly explaination.
Manish Dalwadi 6-Jul-15 5:06am    
i am using this script code to set date in textbox
var defaultDateFormat = '<%= CultureInfo.CurrentCulture.ToString()=="cs-CZ" ? "MM dd, yy":"M dd, yy"%>';
$(data).datepicker({ dateFormat: window.defaultDateFormat }, 'setDate', newDate, $.datepicker.regional[langCode]);

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900