Bonjour, je réalise un site de location, des véhicules qui ce loue un ou plusieurs jours a 20euros(journée) la semaine et 30euros a patir de vendredi jusqu'à dimanche(journée). pour cela je fait appel au datetimepcker, mais je n'arrive pas a inséré un prix sur un jours ou même cinq jours
voici mon code html
Code html : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5 <div class="input-daterange input-group" id="datepicker"> <input type="text" id="date-start" class="form-control floating-label" placeholder="Debut location" name="debut_loc " value="<?php if (isset($_POST['debut_loc'])) echo htmlspecialchars($_POST['debut_loc']);?>"> <span class="input-group-addon">à</span> <input type="text" id="date-end" class="form-control floating-label" placeholder="Fin location" name="fin_loc" value="<?php if (isset($_POST['fin_loc'])) echo htmlspecialchars($_POST['fin_loc']);?>"> </div>
et le js
merci de votre attetion
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 $('#date-end').bootstrapMaterialDatePicker ({ weekStart: 1, format: 'DD/MM/YYYY HH:00', lang: 'fr', cancelText : 'ANNULER' }); $('#date-start').bootstrapMaterialDatePicker ({ weekStart: 1, format: 'DD/MM/YYYY HH:00', lang: 'fr', cancelText : 'ANNULER', }).on('change', function(e, date) { $('#date-end').bootstrapMaterialDatePicker('setMinDate', date); }); $('#min-date').bootstrapMaterialDatePicker({ format : 'DD/MM/YYYY HH', minDate : new Date() }); $.material.init() });
Partager