Date - Flatpickr NEW Bootstrap 4.5 theme
Manage date using the comprehensive Flat Pickr
HIDE CODE
<?php $xcrud = Xcrud::get_instance(); $xcrud->table("orders"); $xcrud->fields("orderDate,status,requiredDate,shippedDate,comments"); $xcrud->change_type("status","select","",array("Not Shipped"=>"Not Shipped","Shipped"=>"Shipped","Completed"=>"Completed")); $xcrud->change_type("orderDate","flatpickr","","{enableTime:false,dateFormat:Y-m-d H:i:s,locale:it,altFormat:d-m-Y,altInput: true}");//"{enableTime:true,dateFormat:Y-m-d H:i:s,locale:it,altFormat:d-m-Y H:i:s,altInput: true} $xcrud->change_type("requiredDate","flatpickr","",'{enableTime:false,dateFormat:Y-m-d H:i,locale:it,altFormat:d-m-Y,altInput: true}'); $xcrud->change_type("shippedDate","flatpickr","",'{enableTime:true,dateFormat:Y-m-d H:i,locale:it,altFormat:d-m-Y,altInput: true}'); echo $xcrud->render(); ?>
Orders
# | Orderdate | Requireddate | Shippeddate | Status | Comments | Customernumber | |
---|---|---|---|---|---|---|---|
1 | 2024-10-17 00:00:00 | 0000-00-00 00:00:00 | 0 | View Edit Remove | |||
2 | 0000-00-00 00:00:00 | 0000-00-00 00:00:00 | 0 | View Edit Remove | |||
3 | 0000-00-00 00:00:00 | 0000-00-00 00:00:00 | Not Shipped | 0 | View Edit Remove | ||
4 | 0000-00-00 00:00:00 | 0000-00-00 00:00:00 | 0 | View Edit Remove |