feat: ✨ Added hours to calendar date input

This commit is contained in:
Noah Lancien 2026-06-11 12:18:01 +02:00
parent 40f90c6422
commit 5e41e3668e
2 changed files with 8 additions and 8 deletions

12
resources/js/app.js vendored
View file

@ -33,7 +33,7 @@ const changeIcon = $('.marque')
const dropDownMarque = $('.marque-select')
// FancyBox Communes
// Confirmation
// Confirmation
$.fancyConfirm = function( opts ) {
opts = $.extend( true, {
title : 'Are you sure?',
@ -42,7 +42,7 @@ $.fancyConfirm = function( opts ) {
noButton : 'Cancel',
callback : $.noop
}, opts || {} );
$.fancybox.open({
type : 'html',
src :
@ -68,7 +68,7 @@ $.fancyConfirm = function( opts ) {
afterClose : function( instance, current, e ) {
var button = e ? e.target || e.currentTarget : null;
var value = button ? $(button).data('value') : 0;
opts.callback( value );
}
}
@ -84,7 +84,7 @@ $.fancyConfirm = function( opts ) {
noButton : 'Cancel',
callback : $.noop
}, opts || {} );
$.fancybox.open({
type : 'html',
src :
@ -92,7 +92,7 @@ $.fancyConfirm = function( opts ) {
'<h3 class="info">' + opts.title + '</h3>' +
'<p>' + opts.message + '</p>' +
'<p class="tright">' +
'<a data-value="0" data-fancybox-close>' + opts.noButton + '</a>' +
'<a data-value="0" data-fancybox-close>' + opts.noButton + '</a>' +
'<button data-value="1" data-fancybox-close class="btn">' + opts.okButton + '</button>' +
'</p>' +
'</div>',
@ -226,7 +226,7 @@ $(document).ready(function(){
$('.addcalendar').on('click', function(event){
event.preventDefault();
$('.calendar').append('<div class="form-field-calendar"><input type="date" name="startdate[]"><input type="date" name="enddate[]"><i class="fas fa-minus-square removecalendar"></i></div>');
$('.calendar').append('<div class="form-field-calendar"><input type="datetime-local" name="startdate[]"><input type="datetime-local" name="enddate[]"><i class="fas fa-minus-square removecalendar"></i></div>');
});
$('.calendar').on('click', '.removecalendar', function(event){

View file

@ -101,8 +101,8 @@
<h4><i class="fas fa-plus-square addcalendar"></i> {{ __('Calendrier de diffusion') }}</h4>
@foreach ($coupon->calendriers()->get() as $calendrier)
<div class="form-field-calendar">
<input type="date" name="startdate[]" value="{{ $calendrier->calendrier_startdate->format('Y-m-d') }}">
<input type="date" name="enddate[]" value="{{ $calendrier->calendrier_enddate->format('Y-m-d') }}">
<input type="datetime-local" name="startdate[]" value="{{ $calendrier->calendrier_startdate->format('Y-m-d H:i') }}">
<input type="datetime-local" name="enddate[]" value="{{ $calendrier->calendrier_enddate->format('Y-m-d H:i') }}">
<i class="fas fa-minus-square removecalendar"></i>
</div>
@endforeach