If you don't mind a rather makeshift solution, you can modify Special Pages to allow for DateTime-Local input fields (assuming that you use Google Chrome, Safari or Opera).
How-to
- Edit the file i18n_specialpages/conf_edit.php - go to line 565, which should have:
And replace it with the following:
- Save, then go to i18n_specialpages/edit.php and go to line 53 and replace:
With:
And save.
Result (for a special field with the newly created 'date' type and label 'Date')
You would still need to format the output (if you are displaying it on the page) using php functions though (namely strtotime to make it a UNIX timestamp and date to do the formatting).
I should make it clear that this is a hack more than anything (and not a rigorously tested one), and is really here as an example/model for further refinement (ideally by the plugin author).
How-to
- Edit the file i18n_specialpages/conf_edit.php - go to line 565, which should have:
PHP Code:
<option value="textfull" <?php echo @$def['type']=='textfull' ? 'selected="selected"' : ''; ?> ><?php i18n('i18n_specialpages/LONG_TEXT_FIELD'); ?></option>
And replace it with the following:
PHP Code:
<option value="textfull" <?php echo @$def['type']=='textfull' ? 'selected="selected"' : ''; ?> ><?php i18n('i18n_specialpages/LONG_TEXT_FIELD'); ?></option>
<option value="date" <?php echo @$def['type']=='date' ? 'selected="selected"' : ''; ?> >Date</option>
- Save, then go to i18n_specialpages/edit.php and go to line 53 and replace:
PHP Code:
case 'textfull': // draw a full width TextBox
echo '<td colspan="2"><b>'.$label.':</b><br />';
echo '<input class="text" type="text" style="width:602px;" id="post-sp-'.$key.'" name="post-sp-'.$key.'" value="'.$value.'" /></td>';
$col += 2;
break;
With:
PHP Code:
case 'textfull': // draw a full width TextBox
echo '<td colspan="2"><b>'.$label.':</b><br />';
echo '<input class="text" type="text" style="width:602px;" id="post-sp-'.$key.'" name="post-sp-'.$key.'" value="'.$value.'" /></td>';
$col += 2;
break;
case 'date':
echo '<td><b>'.$label.':</b><br />';
echo '<input class="datetime-local" type="datetime-local" style="width:295px" id="post-sp-'.$key.'" name="post-sp-'.$key.'" value="'.$value.'" /></td>';
$col++;
break;
And save.
Result (for a special field with the newly created 'date' type and label 'Date')
You would still need to format the output (if you are displaying it on the page) using php functions though (namely strtotime to make it a UNIX timestamp and date to do the formatting).
I should make it clear that this is a hack more than anything (and not a rigorously tested one), and is really here as an example/model for further refinement (ideally by the plugin author).