mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Add pattern and placeholder fallback for input type="date"
This commit is contained in:
parent
a8bc70b025
commit
9e8a61a147
1 changed files with 1 additions and 0 deletions
|
|
@ -559,6 +559,7 @@ class ExtraItem
|
|||
$formattedValue = $value ? sprintf('%s-%s-%s', substr($value, 0, 4), substr($value, 4, 2), substr($value, 6, 2)) : '';
|
||||
$buff[] = '<input type="hidden" class="rx_ev_date" name="' . $column_name . '" value="' . $value . '" />';
|
||||
$buff[] = '<input type="date" id="date_' . $column_name . '" class="date" value="' . $formattedValue . '" ' .
|
||||
'pattern="\d{4}-\d{2}-\d{2}" placeholder="YYYY-MM-DD" ' .
|
||||
'onchange="jQuery(this).prev(\'.rx_ev_date\').val(this.value.replace(/-/g,\'\'));" /> ';
|
||||
$buff[] = '<input type="button" value="' . lang('cmd_delete') . '" class="btn dateRemover" />';
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue