How to get calendars in french ?
Hello
I 'd like to get my calendars in french so, I add a first function in my code but it doesn't work.
Can you tell me what I did wrong ?
Thanks
- <script type="text/javascript">
- $(function() {
- $.datepicker.setDefaults($.datepicker.regional['fr']);
- $('#datepicker').datepicker({showWeeks: true});
- });
- $(function(){
- $( "#from" ).datepicker({
- //defaultDate: "+1w",
- changeMonth: true,
- numberOfMonths: 1,
- dateFormat: 'dd-mm-yy',
- onSelect: function() {
- var date = $(this).datepicker('getDate');
- if (date){
- date.setDate(date.getDate() + 1); // le jours suivant
- $( "#to" ).datepicker( "option", "minDate", date ); // place la date minimum de l'autre champ
- }
- }
- });
- $( "#to" ).datepicker({
- //defaultDate: "+1w",
- changeMonth: true,
- numberOfMonths: 1,
- dateFormat: 'dd-mm-yy',
- onSelect: function() {
- var date = $(this).datepicker('getDate');
- if (date) {
- date.setDate(date.getDate() - 1); // le jour d'avant
- $( "#from" ).datepicker( "option", "maxDate", date );
- }
- }
- });
- })
</script>
Thanks