Date - Flatpickr 1.7.26
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 | Action | Comments | Customernumber | |
---|---|---|---|---|---|---|---|---|
1 | 2003-09-11 00:00:00 | 2003-09-26 00:00:00 | 2003-09-21 00:00:00 | Not Shipped | 0 | They want to reevaluate their terms agreement | 148 | View Edit Remove |
2 | 2003-09-21 00:00:00 | 2003-09-30 00:00:00 | 2003-09-24 00:00:00 | Shipped | 0 | 311 | View Edit Remove | |
3 | 2003-10-10 00:00:00 | 2003-10-19 00:00:00 | 2003-10-16 00:00:00 | Shipped | 0 | 321 | View Edit Remove | |
4 | 2003-10-11 00:00:00 | 2003-10-17 00:00:00 | 2003-10-17 00:00:00 | Shipped | 0 | 347 | View Edit Remove | |
5 | 2003-10-17 00:00:00 | 2003-10-25 00:00:00 | 2003-10-20 00:00:00 | Shipped | 0 | 227 | View Edit Remove | |
6 | 2003-10-18 00:00:00 | 2003-10-26 00:00:00 | 2003-10-19 00:00:00 | Shipped | 0 | 321 | View Edit Remove | |
7 | 2003-10-20 00:00:00 | 2003-10-27 00:00:00 | 2003-10-24 00:00:00 | Shipped | 0 | 424 | View Edit Remove | |
8 | 2003-10-21 00:00:00 | 2003-10-30 00:00:00 | 2003-10-23 00:00:00 | 0 | This order was disputed, but resolved on | 452 | View Edit Remove | |
9 | 2003-10-22 00:00:00 | 2003-10-31 00:00:00 | 2003-12-26 00:00:00 | Shipped | 0 | This order was on hold because customers's credit | 148 | View Edit Remove |
10 | 2003-10-21 00:00:00 | 2003-10-30 00:00:00 | 2003-10-27 00:00:00 | Shipped | 0 | 462 | View Edit Remove |