must specify dateFormat for jQuery UI datepicker, otherwise a wrong MM/DD/YYYY is passed to MySQL
This commit is contained in:
@@ -1080,6 +1080,7 @@ foreach ($rows as $row_id => $vrow) {
|
|||||||
if ($field['pma_type'] == 'date' || $field['pma_type'] == 'datetime' || substr($field['pma_type'], 0, 9) == 'timestamp') {
|
if ($field['pma_type'] == 'date' || $field['pma_type'] == 'datetime' || substr($field['pma_type'], 0, 9) == 'timestamp') {
|
||||||
// the _3 suffix points to the date field
|
// the _3 suffix points to the date field
|
||||||
// the _2 suffix points to the corresponding NULL checkbox
|
// the _2 suffix points to the corresponding NULL checkbox
|
||||||
|
// in dateFormat, 'yy' means the year with 4 digits
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
//<![CDATA[
|
//<![CDATA[
|
||||||
@@ -1090,6 +1091,7 @@ $(function() {
|
|||||||
stepMinutes: 1,
|
stepMinutes: 1,
|
||||||
stepHours: 1,
|
stepHours: 1,
|
||||||
<?php echo ($field['pma_type'] == 'date' ? "showTime: false,":"showTime: true,"); ?>
|
<?php echo ($field['pma_type'] == 'date' ? "showTime: false,":"showTime: true,"); ?>
|
||||||
|
dateFormat: 'yy-mm-dd',
|
||||||
altTimeField: '',
|
altTimeField: '',
|
||||||
constrainInput: false
|
constrainInput: false
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user