Pikaday A refreshing JavaScript Datepicker JS Lib

This is a simple yet fully functional datetime picker

Pikaday A refreshing JavaScript Datepicker

Link: https://github.com/dbushell/Pikaday

PHP date function: http://php.net/manual/en/function.date.php

I’ve found an issue when the instance is not bound to the filed value, eg. I’d like to preload the field value value=”{{ __SELF__.userDob }}”, this will cause the picker not work.

In order to solve this, try to bind the instance to the field value:

change the onSelect line

onSelect: function()


picker = new Pikaday({
    onSelect: function(date) {
        field.value = picker.toString();

Then it should work.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.