Skip to content

Commit 4bc6319

Browse files
committed
Added Date to Form
- the default time is currently server-side, which could be an issue?
1 parent b6faa54 commit 4bc6319

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

quick-weblog.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,12 @@ function quick_weblog_form() {
103103
<input type="text" name="tags" id="quick-weblog-tags" required>
104104
</div>
105105

106+
<div>
107+
<label for="post_date"><?php _e( 'Post Date', 'quick-weblog' ); ?></label>
108+
<?php $default_date = date( 'Y-m-d\TH:i' ); ?>
109+
<input type="datetime-local" name="post_date" id="quick-weblog-post_date" required value="<?php echo $default_date; ?>">
110+
</div>
111+
106112
<div>
107113
<input type="hidden" name="action" value="quick_weblog_submit_form">
108114
<?php wp_nonce_field( 'quick_weblog_submit_form', 'quick_weblog_form_nonce' ); ?>

0 commit comments

Comments
 (0)