I am using jQuery UI Calender for French Language. But unfortunately I see the below error not sure if I am missing some thing. Please advice.
Uncaught TypeError: Cannot read property 'regional' of undefined
JS :
/**
French initialisation for the jQuery UI date picker plugin.
**/
/* Written by Keith Wood (kbwood{at}iinet.au),
Stéphane Nahmani ([email protected]),
Stéphane Raimbault <[email protected]> */
jQuery(function($){
$.datepicker.regional['fr'] = {
closeText: 'Fermer',
prevText: 'Précédent',
nextText: 'Suivant',
currentText: 'Aujourd\'hui',
monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin',
'Juillet','Août','Septembre','Octobre','Novembre','Décembre'],
monthNamesShort: ['Janv.','Févr.','Mars','Avril','Mai','Juin',
'Juil.','Août','Sept.','Oct.','Nov.','Déc.'],
dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'],
dayNamesShort: ['Dim.','Lun.','Mar.','Mer.','Jeu.','Ven.','Sam.'],
dayNamesMin: ['D','L','M','M','J','V','S'],
weekHeader: 'Sem.',
dateFormat: 'dd/mm/yy',
firstDay: 1,
isRTL: false,
showMonthAfterYear: false,
yearSuffix: ''};
$.datepicker.setDefaults($.datepicker.regional['fr']);
});
Thanks!!
I am using jQuery UI Calender for French Language. But unfortunately I see the below error not sure if I am missing some thing. Please advice.
Uncaught TypeError: Cannot read property 'regional' of undefined
JS :
/**
French initialisation for the jQuery UI date picker plugin.
**/
/* Written by Keith Wood (kbwood{at}iinet..au),
Stéphane Nahmani ([email protected]),
Stéphane Raimbault <[email protected]> */
jQuery(function($){
$.datepicker.regional['fr'] = {
closeText: 'Fermer',
prevText: 'Précédent',
nextText: 'Suivant',
currentText: 'Aujourd\'hui',
monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin',
'Juillet','Août','Septembre','Octobre','Novembre','Décembre'],
monthNamesShort: ['Janv.','Févr.','Mars','Avril','Mai','Juin',
'Juil.','Août','Sept.','Oct.','Nov.','Déc.'],
dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'],
dayNamesShort: ['Dim.','Lun.','Mar.','Mer.','Jeu.','Ven.','Sam.'],
dayNamesMin: ['D','L','M','M','J','V','S'],
weekHeader: 'Sem.',
dateFormat: 'dd/mm/yy',
firstDay: 1,
isRTL: false,
showMonthAfterYear: false,
yearSuffix: ''};
$.datepicker.setDefaults($.datepicker.regional['fr']);
});
Thanks!!
Share Improve this question edited Jun 15, 2019 at 7:25 iDeveloper 1,72524 silver badges50 bronze badges asked Mar 2, 2016 at 9:46 DeveloperDeveloper 1,4373 gold badges23 silver badges48 bronze badges 1-
6
That message seems to be telling you that
$.datepicker
is not defined. Have you included the jQuery UI script on the page? – nnnnnn Commented Mar 2, 2016 at 9:49
2 Answers
Reset to default 0I'm guessing you forgot to include the localisation file:
<script src="https://jquery-ui.googlecode./svn-history/r3982/trunk/ui/i18n/jquery.ui.datepicker-nl.js"></script>
Source :Datepicker jQuery UI ... set language
Be sure to do not use ASYNC on script tags, because will fire this error.
Wrong:
<SCRIPT SRC="/includes/js/jquery/jquery-ui.js" TYPE="text/javascript" ASYNC></SCRIPT>
<SCRIPT SRC="/includes/js/jquery/jquery-datepicker-ptBR.js" TYPE="text/javascript" ASYNC></SCRIPT>
Right:
<SCRIPT SRC="/includes/js/jquery/jquery-ui.js" TYPE="text/javascript"></SCRIPT>
<SCRIPT SRC="/includes/js/jquery/jquery-datepicker-ptBR.js" TYPE="text/javascript"></SCRIPT>
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1743893885a4525399.html
评论列表(0条)