Menu
  • HOME
  • TAGS

Creating a date range fields with pikaday datepicker

javascript,datepicker,pikaday

You can use the methods setMinDate and setMaxDate when a new date is selected by the pickaday control: var picker = new Pikaday({ field: document.getElementById('start'), onSelect: function() { picker2.setMinDate(this.getDate()); } }); var picker2 = new Pikaday({ field: document.getElementById('end'), onSelect: function() { picker.setMaxDate(this.getDate()); } }); jsfiddle...

How can I use Pikaday with ReactJS?

reactjs,pikaday

To use Pikaday with ReactJS you can require it as you would any other node module. The trick is to hook into the React rendering event so that after the view is rendered, Pikaday is initialized on any rendered DOM inputs you want to use it on. You can do...

“getDate().toJSON()” loses a day

javascript,angularjs,date,momentjs,pikaday

Giving you're already getting time with momentjs, you can try moment.utc() method. The docs say: As of version 2.0.0, a locale key can be passed as the third parameter to moment() and moment.utc() moment('2012 juillet', 'YYYY MMM', 'fr'); moment('2012 July', 'YYYY MMM', 'en'); You can do a lot more with...

Add text input to Pikaday modal dialog

javascript,css,html5,dom,pikaday

OK, after analyzing the code better - I saw that all the modal dialog is listening to an event on mouse down - that "preventDefault"s it whenever the click is not on an expected target. . So, in my case, just applying class 'pika-select' will make the form element to...

Binding trigger on multiple Pikoday calendar pickers

javascript,jquery,datepicker,calendar,pikaday

I am guessing you may have problems with one of the includes, may be an old version of pikaday is being used/the order of includes as it works fine when I try it. Also, since you know that the trigger button is right next to the input, you may use...