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

Symfony PHP Discussion :

afficher date symfony2


Sujet :

Symfony PHP

  1. #1
    Membre éclairé Avatar de fahdijbeli
    Homme Profil pro
    Étudiant
    Inscrit en
    Juin 2012
    Messages
    281
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Matériel informatique

    Informations forums :
    Inscription : Juin 2012
    Messages : 281
    Par défaut afficher date symfony2
    j'ai un probléme pour l'affichage d'une date voici mon formBuilder:
    Code : 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
     
     $formBuilder
            ->add('name','text')
            ->add('adress',   'text')
            ->add('tel1', 'text')
            ->add('tel2',  'text')
            ->add('fax',  'text')
            ->add('email',  'text')
            ->add('matriculeFiscale',  'text')
            ->add('registreCommerce',  'text')
            ->add('managerName',  'text')
            ->add('managerTel',  'text')
            ->add('managerEmail',  'text')
            ->add('loginProvider',  'text')
            ->add('passwordProvider',  'text')
            ->add('login',  'text')
            ->add('password',  'text')
            ->add('ipAutorized',  'text')     
            ->add('dateCreation',  'date');
    voila le template twig:
    Code : 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
     
    <form method="post" {{ form_enctype(form) }}>
     
        {{ form_widget(form.name) }}
        {{ form_widget(form.adress) }}
        {{ form_widget(form.tel1) }}
        {{ form_widget(form.tel2) }}
        {{ form_widget(form.fax) }}
        {{ form_widget(form.email) }}
        {{ form_widget(form.matriculeFiscale) }}
        {{ form_widget(form.registreCommerce) }}
        {{ form_widget(form.managerName) }}
        {{ form_widget(form.managerTel) }}
        {{ form_widget(form.managerEmail) }}
        {{ form_widget(form.loginProvider) }}
        {{ form_widget(form.passwordProvider) }}
        {{ form_widget(form.login) }}
        {{ form_widget(form.password) }}
        {{ form_widget(form.ipAutorized) }}
        {{ form_widget(form.dateCreation) }}
     
    	<input type="submit" />
    </form>
    voila l'erreur:
    The Symfony\Component\Locale\Stub\StubIntlDateFormatter::setLenient() is not implemented. Please install the 'intl' extension for full localization capabilities.
    Merci d'avance.

  2. #2
    Membre éclairé
    Homme Profil pro
    Développeur Web
    Inscrit en
    Avril 2012
    Messages
    394
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Hauts de Seine (Île de France)

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Avril 2012
    Messages : 394
    Par défaut
    tu as le widget date :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    $builder->add('champDate', 'date', array('widget' => ...
    http://symfony.com/doc/current/refer...ypes/date.html

  3. #3
    Membre éclairé Avatar de fahdijbeli
    Homme Profil pro
    Étudiant
    Inscrit en
    Juin 2012
    Messages
    281
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Matériel informatique

    Informations forums :
    Inscription : Juin 2012
    Messages : 281
    Par défaut
    j'ai modifié ca mais le méme erreur
    ->add('dateCreation', 'date', array(
    'input' => 'datetime',
    'widget' => 'text'
    ));

  4. #4
    Membre éclairé
    Homme Profil pro
    Développeur Web
    Inscrit en
    Avril 2012
    Messages
    394
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Hauts de Seine (Île de France)

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Avril 2012
    Messages : 394
    Par défaut
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    ->add('dateCreation', 'date', array(
                                                    'widget' => 'single_text',
                                                    'input' => 'datetime',
                                                    'format' => 'dd/MM/yyyy',
                                                    )

  5. #5
    Membre éclairé Avatar de fahdijbeli
    Homme Profil pro
    Étudiant
    Inscrit en
    Juin 2012
    Messages
    281
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Matériel informatique

    Informations forums :
    Inscription : Juin 2012
    Messages : 281
    Par défaut
    j'ai fait ca mais le méme erreur :
    The Symfony\Component\Locale\Stub\StubIntlDateFormatter::setLenient() is not implemented. Please install the 'intl' extension for full localization capabilities.

  6. #6
    Membre éclairé
    Homme Profil pro
    Développeur Web
    Inscrit en
    Avril 2012
    Messages
    394
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Hauts de Seine (Île de France)

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Avril 2012
    Messages : 394

  7. #7
    Membre éclairé Avatar de fahdijbeli
    Homme Profil pro
    Étudiant
    Inscrit en
    Juin 2012
    Messages
    281
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Matériel informatique

    Informations forums :
    Inscription : Juin 2012
    Messages : 281
    Par défaut
    merci , je vais essayer

  8. #8
    Membre éclairé Avatar de fahdijbeli
    Homme Profil pro
    Étudiant
    Inscrit en
    Juin 2012
    Messages
    281
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Matériel informatique

    Informations forums :
    Inscription : Juin 2012
    Messages : 281
    Par défaut
    j'ai consulté le site mais il me demande de modifier le fichier :
    tests/Symfony/Tests/Component/Form/Extension/Core/Type/DateTypeTest.php
    mais je l'ai pas trouvé .

  9. #9
    Membre éclairé
    Homme Profil pro
    Développeur Web
    Inscrit en
    Avril 2012
    Messages
    394
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Hauts de Seine (Île de France)

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Avril 2012
    Messages : 394
    Par défaut
    modifie juste : Symfony/vendor/src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php

  10. #10
    Membre éclairé Avatar de fahdijbeli
    Homme Profil pro
    Étudiant
    Inscrit en
    Juin 2012
    Messages
    281
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Matériel informatique

    Informations forums :
    Inscription : Juin 2012
    Messages : 281
    Par défaut
    merci ca marche mais le dossier vendor\symfony\tests n'existe plus l'orsque je vais créer des nouveaus projets alors que j'ai des anciens projets qui contien le dossier vendor\symfony\tests
    merci pour l'aide.

  11. #11
    Membre éclairé
    Homme Profil pro
    Développeur Web
    Inscrit en
    Avril 2012
    Messages
    394
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Hauts de Seine (Île de France)

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Avril 2012
    Messages : 394
    Par défaut
    il n y a pas de dossier vendor\symfony\tests regarde : Test unitaire Sf2

  12. #12
    Membre éclairé Avatar de fahdijbeli
    Homme Profil pro
    Étudiant
    Inscrit en
    Juin 2012
    Messages
    281
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Matériel informatique

    Informations forums :
    Inscription : Juin 2012
    Messages : 281
    Par défaut
    ok merci beaucoup pour l'aide.

Discussions similaires

  1. fonction affiche date
    Par mido_amir dans le forum C++
    Réponses: 2
    Dernier message: 11/12/2006, 23h58
  2. [SQL] Afficher date d'enregistrement
    Par citadelle dans le forum PHP & Base de données
    Réponses: 7
    Dernier message: 10/06/2006, 18h20
  3. Afficher date du jours
    Par tit_oune dans le forum Langage
    Réponses: 1
    Dernier message: 14/04/2006, 10h49
  4. Afficher date jour par defaut dans Combox de dates...
    Par nicburger dans le forum Access
    Réponses: 5
    Dernier message: 08/02/2006, 14h59
  5. affiche date du jour dans champ texte
    Par pascal.cargouet dans le forum Général JavaScript
    Réponses: 6
    Dernier message: 12/01/2005, 11h04

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