[cakephp] - comment intergrer un fichier datepicker dans la vue
gisgi
Messages postés
2
Date d'inscription
Statut
Membre
Dernière intervention
-
gisgi Messages postés 2 Date d'inscription Statut Membre Dernière intervention -
gisgi Messages postés 2 Date d'inscription Statut Membre Dernière intervention -
je ne comprent pas prkoi mon calendrier ne s'affiche mem pas
EDIT : Ajout des balises de code (la coloration syntaxique).
Explications disponibles ici :
https://codes-sources.commentcamarche.net/faq/10686-le-nouveau-codes-sources-comment-ca-marche#balises-code
Merci d'y penser dans tes prochains messages.
.
EDIT2 : Titre modifié pour faire apparaitre : cakephp
<!--voici mon fichier index.ctp dans ma vue --> <html> <head> <!--apel de mes fichiers js et css contenu dans webroot/css et webroot/css--> <?php echo $this->Html->css ( 'datepicker' );?> <?php echo $this->Html->script('bootstrap-datepicker.js'); ?> <!-- ls script qui chargera le datepicker --> </head> <FORM METHOD="GET" ACTION="[http://localhost/cake%20-%20Copie/cake/Stats/index]"> <LI>Date_D: <input type="text" name="date_debut" class="datepicker" size=30 value="<?= $date_debut ?>"> <LI>Date_F: <input type="text" name="date_fin" size=30 value="<?= $date_fin ?>"> Who <select name="who"> <option <?php if($who == COUNT_REGISTRATION) echo "selected='selected'"; ?> value="<?= COUNT_REGISTRATION ?>">Inscrit</option> <option <?php if($who == COUNT_CONNECTIONS) echo "selected='selected'"; ?> value="<?= COUNT_CONNECTIONS ?>">Connecte</option> </select> Group By <select name="group"> <option <?php if($group == COUNT_BY_YEAR) echo "selected='selected'"; ?> value="<?= COUNT_BY_YEAR ?>">Year</option> <option <?php if($group == COUNT_BY_MONTH) echo "selected='selected'"; ?> value="<?= COUNT_BY_MONTH ?>">Month</option> <option <?php if($group == COUNT_BY_WEEK) echo "selected='selected'"; ?> value="<?= COUNT_BY_WEEK ?>">Week</option> <option <?php if($group == COUNT_BY_DATE) echo "selected='selected'"; ?> value="<?= COUNT_BY_DATE ?>">Date</option> <option <?php if($group == COUNT_BY_HOUR) echo "selected='selected'"; ?> value="<?= COUNT_BY_HOUR ?>">Hour</option> </select> <button type="submit">Submit</button> </FORM> <?php if(isset($by_year)): ?> <div class="statistics index"> <h2><?php echo __('Statistics par Annees'); ?></h2> <table cellpadding="0" cellspacing="0"> <tr> <th><?php echo $this->Paginator->sort('Year'); ?></th> <th><?php echo $this->Paginator->sort('Number'); ?></th> </tr> <?php foreach ($by_year as $data): ?> <tr> <td><?php echo h($data[0]['year']); ?></td> <td><?php echo h($data[0]['count']); ?> </td> </tr> <?php endforeach; ?> </table> </div> <?php endif; ?> <?php if(isset($by_month)): ?> <div class="statistics index"> <h2><?php echo __('Statistics par Mois'); ?></h2> <table cellpadding="0" cellspacing="0"> <tr> <th><?php echo $this->Paginator->sort('Year'); ?></th> <th><?php echo $this->Paginator->sort('Month'); ?></th> <th><?php echo $this->Paginator->sort('Number'); ?></th> </tr> <?php foreach ($by_month as $data): ?> <tr> <td><?php echo h($data[0]['year']); ?></td> <td><?php echo h($data[0]['month']); ?></td> <td><?php echo h($data[0]['count']); ?> </td> </tr> <?php endforeach; ?> </table> </div> <?php endif; ?> <?php if(isset($by_week)): ?> <div class="statistics index"> <h2><?php echo __('Statistics par Week'); ?></h2> <table cellpadding="0" cellspacing="0"> <tr> <th><?php echo $this->Paginator->sort('Year'); ?></th> <th><?php echo $this->Paginator->sort('Month'); ?></th> <th><?php echo $this->Paginator->sort('Week'); ?></th> <th><?php echo $this->Paginator->sort('Number'); ?></th> </tr> <?php foreach ($by_week as $data): ?> <tr> <td><?php echo h($data[0]['year']); ?></td> <td><?php echo h($data[0]['month']); ?></td> <td><?php echo h($data[0]['week']); ?></td> <td><?php echo h($data[0]['count']); ?> </td> </tr> <?php endforeach; ?> </table> </div> <?php endif; ?> <?php if(isset($by_date)): ?> <div class="statistics index"> <h2><?php echo __('Statistics par Date'); ?></h2> <table cellpadding="0" cellspacing="0"> <tr> <th><?php echo $this->Paginator->sort('Year'); ?></th> <th><?php echo $this->Paginator->sort('Month'); ?></th> <th><?php echo $this->Paginator->sort('Week'); ?></th> <th><?php echo $this->Paginator->sort('Date'); ?></th> <th><?php echo $this->Paginator->sort('Number'); ?></th> </tr> <?php foreach ($by_date as $data): ?> <tr> <td><?php echo h($data[0]['year']); ?></td> <td><?php echo h($data[0]['month']); ?></td> <td><?php echo h($data[0]['week']); ?></td> <td><?php echo h($data[0]['date']); ?></td> <td><?php echo h($data[0]['count']); ?></td> </tr> <?php endforeach; ?> </table> </div> <?php endif; ?> <?php if(isset($by_hour)): ?><div class="statistics index"> <h2><?php echo __('Statistics par Heure'); ?></h2> <table cellpadding="0" cellspacing="0"> <tr> <th><?php echo $this->Paginator->sort('Year'); ?></th> <th><?php echo $this->Paginator->sort('Month'); ?></th> <th><?php echo $this->Paginator->sort('Week'); ?></th> <th><?php echo $this->Paginator->sort('Date'); ?></th> <th><?php echo $this->Paginator->sort('Hour'); ?></th> <th><?php echo $this->Paginator->sort('Number'); ?></th> </tr> <?php foreach ($by_hour as $data): ?> <tr> <td><?php echo h($data[0]['year']); ?></td> <td><?php echo h($data[0]['month']); ?></td> <td><?php echo h($data[0]['week']); ?></td> <td><?php echo h($data[0]['date']); ?></td> <td><?php echo h($data[0]['hour']); ?></td> <td><?php echo h($data[0]['count']); ?> </td> </tr> <?php endforeach; ?> </table> </div> <?php endif; ?> <script script="javascript"> // <![CDATA[ var opts = { // Attach input with an id of "dp-1" and give it a "d-sl-m-sl-Y" date format (e.g. 13/03/1990) formElements:{"dp_1":"dp_1"} }; datePickerController.createDatePicker(opts); // ]]> //alert("sonya"); </script> <html> <head> <?php echo $this->Html->css ( 'datepicker' );?> <?php echo $this->Html->script('bootstrap-datepicker.js'); ?> <!-- ls script qui chargera le datepicker --> </head> <FORM METHOD="GET" ACTION="[http://localhost/cake%20-%20Copie/cake/Stats/index]"> <LI>Date_D: <input type="text" name="date_debut" class="datepicker" size=30 value="<?= $date_debut ?>"> <LI>Date_F: <input type="text" name="date_fin" size=30 value="<?= $date_fin ?>"> Who <select name="who"> <option <?php if($who == COUNT_REGISTRATION) echo "selected='selected'"; ?> value="<?= COUNT_REGISTRATION ?>">Inscrit</option> <option <?php if($who == COUNT_CONNECTIONS) echo "selected='selected'"; ?> value="<?= COUNT_CONNECTIONS ?>">Connecte</option> </select> Group By <select name="group"> <option <?php if($group == COUNT_BY_YEAR) echo "selected='selected'"; ?> value="<?= COUNT_BY_YEAR ?>">Year</option> <option <?php if($group == COUNT_BY_MONTH) echo "selected='selected'"; ?> value="<?= COUNT_BY_MONTH ?>">Month</option> <option <?php if($group == COUNT_BY_WEEK) echo "selected='selected'"; ?> value="<?= COUNT_BY_WEEK ?>">Week</option> <option <?php if($group == COUNT_BY_DATE) echo "selected='selected'"; ?> value="<?= COUNT_BY_DATE ?>">Date</option> <option <?php if($group == COUNT_BY_HOUR) echo "selected='selected'"; ?> value="<?= COUNT_BY_HOUR ?>">Hour</option> </select> <button type="submit">Submit</button> </FORM> <?php if(isset($by_year)): ?> <div class="statistics index"> <h2><?php echo __('Statistics par Annees'); ?></h2> <table cellpadding="0" cellspacing="0"> <tr> <th><?php echo $this->Paginator->sort('Year'); ?></th> <th><?php echo $this->Paginator->sort('Number'); ?></th> </tr> <?php foreach ($by_year as $data): ?> <tr> <td><?php echo h($data[0]['year']); ?></td> <td><?php echo h($data[0]['count']); ?> </td> </tr> <?php endforeach; ?> </table> </div> <?php endif; ?> <?php if(isset($by_month)): ?> <div class="statistics index"> <h2><?php echo __('Statistics par Mois'); ?></h2> <table cellpadding="0" cellspacing="0"> <tr> <th><?php echo $this->Paginator->sort('Year'); ?></th> <th><?php echo $this->Paginator->sort('Month'); ?></th> <th><?php echo $this->Paginator->sort('Number'); ?></th> </tr> <?php foreach ($by_month as $data): ?> <tr> <td><?php echo h($data[0]['year']); ?></td> <td><?php echo h($data[0]['month']); ?></td> <td><?php echo h($data[0]['count']); ?> </td> </tr> <?php endforeach; ?> </table> </div> <?php endif; ?> <?php if(isset($by_week)): ?> <div class="statistics index"> <h2><?php echo __('Statistics par Week'); ?></h2> <table cellpadding="0" cellspacing="0"> <tr> <th><?php echo $this->Paginator->sort('Year'); ?></th> <th><?php echo $this->Paginator->sort('Month'); ?></th> <th><?php echo $this->Paginator->sort('Week'); ?></th> <th><?php echo $this->Paginator->sort('Number'); ?></th> </tr> <?php foreach ($by_week as $data): ?> <tr> <td><?php echo h($data[0]['year']); ?></td> <td><?php echo h($data[0]['month']); ?></td> <td><?php echo h($data[0]['week']); ?></td> <td><?php echo h($data[0]['count']); ?> </td> </tr> <?php endforeach; ?> </table> </div> <?php endif; ?> <?php if(isset($by_date)): ?> <div class="statistics index"> <h2><?php echo __('Statistics par Date'); ?></h2> <table cellpadding="0" cellspacing="0"> <tr> <th><?php echo $this->Paginator->sort('Year'); ?></th> <th><?php echo $this->Paginator->sort('Month'); ?></th> <th><?php echo $this->Paginator->sort('Week'); ?></th> <th><?php echo $this->Paginator->sort('Date'); ?></th> <th><?php echo $this->Paginator->sort('Number'); ?></th> </tr> <?php foreach ($by_date as $data): ?> <tr> <td><?php echo h($data[0]['year']); ?></td> <td><?php echo h($data[0]['month']); ?></td> <td><?php echo h($data[0]['week']); ?></td> <td><?php echo h($data[0]['date']); ?></td> <td><?php echo h($data[0]['count']); ?></td> </tr> <?php endforeach; ?> </table> </div> <?php endif; ?> <?php if(isset($by_hour)): ?><div class="statistics index"> <h2><?php echo __('Statistics par Heure'); ?></h2> <table cellpadding="0" cellspacing="0"> <tr> <th><?php echo $this->Paginator->sort('Year'); ?></th> <th><?php echo $this->Paginator->sort('Month'); ?></th> <th><?php echo $this->Paginator->sort('Week'); ?></th> <th><?php echo $this->Paginator->sort('Date'); ?></th> <th><?php echo $this->Paginator->sort('Hour'); ?></th> <th><?php echo $this->Paginator->sort('Number'); ?></th> </tr> <?php foreach ($by_hour as $data): ?> <tr> <td><?php echo h($data[0]['year']); ?></td> <td><?php echo h($data[0]['month']); ?></td> <td><?php echo h($data[0]['week']); ?></td> <td><?php echo h($data[0]['date']); ?></td> <td><?php echo h($data[0]['hour']); ?></td> <td><?php echo h($data[0]['count']); ?> </td> </tr> <?php endforeach; ?> </table> </div> <?php endif; ?> <script script="javascript"> // <![CDATA[ var opts = { // Attach input with an id of "dp-1" and give it a "d-sl-m-sl-Y" date format (e.g. 13/03/1990) formElements:{"dp_1":"dp_1"} }; datePickerController.createDatePicker(opts); // ]]> alert("sonya"); </script>
EDIT : Ajout des balises de code (la coloration syntaxique).
Explications disponibles ici :
https://codes-sources.commentcamarche.net/faq/10686-le-nouveau-codes-sources-comment-ca-marche#balises-code
Merci d'y penser dans tes prochains messages.
.
EDIT2 : Titre modifié pour faire apparaitre : cakephp
A voir également:
- [cakephp] - comment intergrer un fichier datepicker dans la vue
- Comment réduire la taille d'un fichier - Guide
- Comment ouvrir un fichier epub ? - Guide
- Fichier bin - Guide
- Vue satellite en direct gratuit de ma maison - Guide
- Fichier rar - Guide
1 réponse
Bonjour,
Tu parles de vue .... je suppose donc que tu utilises un framework .... lequel ??
Ensuites;.. as tu regardé dans la console de ton navigateur si tu n'aurais pas des erreurs de script qui apparaitraient ?
Tu parles de vue .... je suppose donc que tu utilises un framework .... lequel ??
Ensuites;.. as tu regardé dans la console de ton navigateur si tu n'aurais pas des erreurs de script qui apparaitraient ?
gisgi
Messages postés
2
Date d'inscription
Statut
Membre
Dernière intervention
j'utilise le cakephp.biensur il n'ya aucune erreur