• Resolved 2020media

    (@2020media)


    Hi
    If using the [wphostel-list] shortcode, the date picker pop-up isn’t working for me.
    If only works on the [wphostel-booking] (for me at least)
    Anyone else seeing this?

    Whilst I am on dates, I’d like to display the date in the format of DD-MM-YYYY (more usual in the UK)
    Happy to chnge the plugin to do this myself but of course I’d rather if this went into the official version.

    https://wordpress.org/plugins/hostel/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Bob

    (@prasunsen)

    The date format is read from your main settings page

    I can’t comment on the other issue without seeing it.

    Thread Starter 2020media

    (@2020media)

    Hi
    I installed the plugin on a clean WP site and the date picker pop-up is working there so that problem must be mine. I’ll tackle that directly.

    On the date display issue, I’ve tried changing date setting under /wp-admin/options-general.php
    example: 06/05/2014 (6th of May 2014)

    But on the page where [wphostel-list] shortcode the date in the date box is displayed as YYYY-MM-DD
    example: From date: 2014-05-07

    Thank you

    Plugin Author Bob

    (@prasunsen)

    Oh you mean the date picker. Changing this will be a problem because the value is directly entered into the database – should we allow custom format we’ll not be able to do it because people can use any format. I’ll see if something can be done about this, but probably not.

    Thread Starter 2020media

    (@2020media)

    Hi
    I think that should be fine – as far as I know, the date is always saved in the database in a standard way but just displayed using PHP’s date format in the way the user wants it.

    Thread Starter 2020media

    (@2020media)

    http://codex.wordpress.org/Function_Reference/date_i18n refers.

    I will have a look at this myself today.

    Plugin Author Bob

    (@prasunsen)

    Thanks, this looks good, I’ll try it and if it solves, will submit new version

    Plugin Author Bob

    (@prasunsen)

    Sorry, it won’t solve anything – it expects unix timestamp. We don’t get timestamp from the datepicker, we get the date as entered by the user. And if we get custom defined date format, there is no guarantee that strtotime() will be able to resolve it.

    What needs to be done is to allow the date picker to use second field – I am not sure it’s worth the effort for just a nice display of the date. Will consider it for future version.

    Thread Starter 2020media

    (@2020media)

    Thanks, I agree.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Date picker not working’ is closed to new replies.