Vinum Posted September 15, 2012 Posted September 15, 2012 j' essai d'intégrer le nouveau date picker dans prestashop 1.5. J'ai créé un nouveau sous onglet en back office dans la partie commande. Tout fonctionne correctement mais je n'arrive pas à intégrer le date picker. j'ai éssayé comme çà : $context = Context::getContext(); $context->controller->addJqueryUI('ui.datepicker'); et comme ça : $this->context->controller->addJqueryUI('ui.datepicker'); rien ne fonctionne cela me dit : Call to a member function addJqueryUI() on a non-object or normalement le controleur existe bien puisque tout fonctionne sauf le date picker. Si quelqu'un a une idée ? Share this post Link to post Share on other sites More sharing options...
J. Danse Posted September 15, 2012 Posted September 15, 2012 Bonsoir, Si vous utilisez les options de champs, vous pouvez indiquez que ce dernier est un "date". Sinon, tentez ce code direct: <input type="text" size="32" data-hex="true" class="datepicker" name="nomduchamp" value="valeurduchamp|escape:'htmlall':'UTF-8'}" /> Par exemple. Share this post Link to post Share on other sites More sharing options...
Vinum Posted September 16, 2012 Posted September 16, 2012 Une fois que le date picker est intégré, je sais l'utiliser. Le problème c'est que je n'arrive pas à l'intégrer dans le contrôleur. En fait pour créer l'onglet j'utilise la méthode de PS 1.4 car d'après la doc de PS 1.5 c'est la même. Mais je pense que non. Il dit y avoir une autre méthode pour créer un onglet dans le back office. Share this post Link to post Share on other sites More sharing options...
J. Danse Posted September 16, 2012 Posted September 16, 2012 Exact, il en existe une... Vous passez par un module ? Je vais vous fournir un module 'exemple' qui implémente un onglet et un date picker d'ici peu ! Share this post Link to post Share on other sites More sharing options...
J. Danse Posted September 16, 2012 Posted September 16, 2012 Voici un module exemple: Lien du post 1 Share this post Link to post Share on other sites More sharing options...
Vinum Posted September 16, 2012 Posted September 16, 2012 C'est bien ce que je pensais. la doc pour la 1.5 n'est pas à jour. Merci pour l'exemple. 1 Share this post Link to post Share on other sites More sharing options...
J. Danse Posted September 16, 2012 Posted September 16, 2012 Exact, malheureusement la doc n'est pas à jour... Share this post Link to post Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now