IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

jQuery Discussion :

Datepicker fr pas bon malgré conseils


Sujet :

jQuery

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre Expert
    Avatar de laurentSc
    Homme Profil pro
    Webmaster débutant perpétuel !
    Inscrit en
    Octobre 2006
    Messages
    10 493
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 61
    Localisation : France, Isère (Rhône Alpes)

    Informations professionnelles :
    Activité : Webmaster débutant perpétuel !
    Secteur : Industrie

    Informations forums :
    Inscription : Octobre 2006
    Messages : 10 493
    Billets dans le blog
    1
    Par défaut Datepicker fr pas bon malgré conseils
    Bonjour,

    je poste car bien qu'ayant suivi la doc officielle , datepicker affiche encore en format en :

    Code html : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    <!doctype html>
    <html lang="en">
    <head>
      <meta charset="utf-8">
      <title>jQuery UI Datepicker - Localize calendar</title>
      <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">
      <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
      <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
      <script src="jquery.ui.datepicker-ar.js"></script>
      <script src="jquery.ui.datepicker-fr.js"></script>
      <script src="jquery.ui.datepicker-he.js"></script>
      <script src="jquery.ui.datepicker-zh-TW.js"></script>
      <link rel="stylesheet" href="/resources/demos/style.css">
      <script>
      </script>
    </head>
    <body>
    <p>Date: <input type="text" id="datepicker">&nbsp;
      <select id="locale">
        <option value="ar">Arabic (‫(العربية</option>
        <option value="zh-TW">Chinese Traditional (繁體中文)</option>
        <option value="">English</option>
        <option value="fr" selected="selected">French (Fran&ccedil;ais)</option>
        <option value="he">Hebrew (‫(עברית</option>
      </select></p>
    </body>
    </html>

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    $(function() {
        $( "#datepicker" ).datepicker( $.datepicker.regional[ "fr" ] );
        $( "#locale" ).change(function() {
          $( "#datepicker" ).datepicker( "option",
            $.datepicker.regional[ $( this ).val() ] );
        });
      });
    donc comment faire ?

  2. #2
    Invité
    Invité(e)
    Par défaut
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    $("#datepicker").datepicker({ 
    	dateFormat: 'DD dd MM yy', firstDay:1, minDate: new Date(),	// (affichage) de la forme : Vendredi 27 Janvier 2012 
    	altFormat: 'yy-mm-dd', altField: '#datepicker_iso'		// (champ caché) format : yy-mm-dd (anglais)
    });
    Pour l'avoir en français, il faut ce fichier : jquery.ui.datepicker-fr.js
    Code js : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    /* French initialisation for the jQuery UI date picker plugin. */
    /* Written by Keith Wood (kbwood{at}iinet.com.au) and Stéphane Nahmani (sholby@sholby.net). */
    jQuery(function($){
    	$.datepicker.regional['fr'] = {
    		closeText: 'Fermer',
    		prevText: '&#x3c;Préc',
    		nextText: 'Suiv&#x3e;',
    		currentText: 'Courant',
    		monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin',
    		'Juillet','Août','Septembre','Octobre','Novembre','Décembre'],
    		monthNamesShort: ['Jan','Fév','Mar','Avr','Mai','Jun',
    		'Jul','Aoû','Sep','Oct','Nov','Déc'],
    		dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'],
    		dayNamesShort: ['Dim','Lun','Mar','Mer','Jeu','Ven','Sam'],
    		dayNamesMin: ['Di','Lu','Ma','Me','Je','Ve','Sa'],
    		weekHeader: 'Sm',
    		dateFormat: 'dd/mm/yy',
    		firstDay: 1,
    		isRTL: false,
    		showMonthAfterYear: false,
    		yearSuffix: ''};
    	$.datepicker.setDefaults($.datepicker.regional['fr']);
    });

  3. #3
    Membre Expert
    Avatar de laurentSc
    Homme Profil pro
    Webmaster débutant perpétuel !
    Inscrit en
    Octobre 2006
    Messages
    10 493
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 61
    Localisation : France, Isère (Rhône Alpes)

    Informations professionnelles :
    Activité : Webmaster débutant perpétuel !
    Secteur : Industrie

    Informations forums :
    Inscription : Octobre 2006
    Messages : 10 493
    Billets dans le blog
    1
    Par défaut
    nickel ! Il a juste fallu que j'encode la page en utf-8...

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Session et include => pas bon ménage ?
    Par shadeoner dans le forum Langage
    Réponses: 11
    Dernier message: 10/07/2006, 10h30
  2. Réponses: 5
    Dernier message: 27/10/2005, 12h23
  3. ANPE et interim.... ça sent pas bon
    Par mister3957 dans le forum Emploi
    Réponses: 24
    Dernier message: 07/10/2005, 10h22
  4. update et where font pas bon menage!!
    Par kleenex dans le forum Access
    Réponses: 5
    Dernier message: 30/09/2005, 17h45

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo