amsul / pickadate.js

The mobile-friendly, responsive, and lightweight jQuery date & time input picker.
http://amsul.ca/pickadate.js
MIT License
7.7k stars 1.01k forks source link

Timepicker: onSet context argument #589

Open demrks opened 9 years ago

demrks commented 9 years ago

If I console.log the datepicker onSet context argument like so

onSet: function( val ) {
    console.log( val );
}

pickadate.js returns a timestamp. The timepicker doesn't return a timestamp though. So if I select "5:00 PM" in the timepicker, I'll get "1020". Is there any reason why the timepicker doesn't return a timestamp (similar to the datepicker)? Something like "61200" for 5:00 PM...

EDIT: I know that I can multiply "1020" by 60 to get "61200"... But I'm not sure why the timepicker doesn't output a timestamp by default...

amsul commented 9 years ago

..because it wasn’t thought through very well :disappointed:

I’ll reserve this one for v4 because it would be a breaking change.

Cheers!