DateTime picker control time default for timestamp

Support General DateTime picker control time default for timestamp

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #4127
    lemonydesignlemonydesign
    Participant

    Hello Metaboxes
    I'm using the timestamp on the DateTime picker to set up a simple "events" plugin that allows me to control when to expire an event.

    I want to use a more flexible way of entering time of event, so am using a simple text field. For this reason, I don't actually need to person entering the event to add a time to the DateTime picker.

    All fine, but what I would like to do is to "expire" the event at the END of a day - i.e. when the time is 23:59 (rather than 00:00). Is there a way I can set a default time, that means that I can turn off the time part of the DateTime picker but have the time default to 23:59?

    BTW - am turning off the time part of the picker using:
    'js_options' => array( 'showTimepicker' => false, ),

    Thanks for any help

    #4132
    Anh TranAnh Tran
    Keymaster

    Hi,

    Why don't you use date picker and select a date, and calculate the expiry time with "date 23:59" by PHP? You might also add a message for users so they're not confused when selecting a date.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘DateTime picker control time default for timestamp’ is closed to new replies.