• c.note

    (@cnote)


    anyone figured out a way to have a calendar style picker on the more fields date field type. i dont mind the date format input box but the site admin user would prefer a calendar type picker. must be possible?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Kal Str?m

    (@kalstrom)

    Depending on the browser you’re using the HTML5 date field actually is a calendar type picker.

    There’s a page for Web Form 2.0 input types.

    Test it with your browser. We actually had a date picker field in plugin form before, but we haven’t updated it to 2.0 because it is going to be supported in all major browsers any way.

    But you could look into updating it yourself.

    Thread Starter c.note

    (@cnote)

    that is a bit strange as i see the 2.0 version on the link you sent but in my wp-admin install of the more fields plugin, i just see a basic text field. os x 10.6.5 safari 5.0.3.

    why does it default to 1582-10-15 as an initial date that isnt very useful to anyone, i think ill look at a way to get it to default today’s date. surely that must be possible otherwise html5 isnt really worthwhile.

    great plugin by the way, the date picker bit isnt that important everything else is super!

    Plugin Author Kal Str?m

    (@kalstrom)

    1582 is actually browser default it seems. Strange though.

    Thread Starter c.note

    (@cnote)

    I updated the plugin and my wp install to incorporate this html5 date tool: https://flowplayer.org/tools/dateinput/index.html

    all good!

    Plugin Author Kal Str?m

    (@kalstrom)

    Cool. If you’d like I could share your solution on the More Plugins site.

    If you’d like to share the code that is.

    Thread Starter c.note

    (@cnote)

    i have no idea about plugin development so my solution is kind of an ad hoc one and i didn’t actually have to change anything in the plugin but im happy to explain what i did.

    i added this to the functions.php:
    function admin_register_head() {
    echo “<link rel=’stylesheet’ type=’text/css’ href=’path to calendar widget style sheet’ />\n”;
    echo “<script type=’text/javascript’ src=’path to calendar widget js’></script>\n”;
    }
    add_action(‘admin_head’, ‘admin_register_head’);

    i also added this to wp-admin/admin-footer.php:
    <script>$(‘:date’).dateinput({format:’yyyy-mm-dd’});</script>

    it would be much better if it was all self-contained within the more-fields plugin, maybe this is something someone else who has knowledge of plugin development could do.

    hopefully this solution can be of use to other people. i tested it on Safari (Mac and PC),Firefox (Mac and PC), Chrome (Mac and PC) and IE (PC).

    Thread Starter c.note

    (@cnote)

    update on this, with 3.2.1 its causes an issue which means the admin widget drag and drop doesnt work so ive stopped using it and just going with the default date field.

    it still really needs a proper date picker though

    This is also a main issue for me as Chrome has a weird system for HTML5 date field. A date picker or some sort of date formatting is an absolutely necessary feature.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: More Fields] Date field’ is closed to new replies.