Closed kasulachetu closed 10 years ago
As I was debugging this in the console, I found that #('#start_date').val() is also returning just the date, but $('#start_date').attr('val') is returning the actual value including the time part.
I haven't seen this before, thanks for pointing it out. Can you see what $('#start_date').datetimepicker('getDate') returns? Wondering if it stems from this line:
These may need to change the .val() to .attr('val') here:
It returns the timestamp (Thu Aug 21 2014 00:00:00 GMT-0400 (EDT)
), including the timezone info which user may not have selected.
Are you able to try changing this line to .attr('value')? If not it may be tomorrow before I am able to work up an example of this to test with the altered library.
I tried, but it didn't seem to fix the issue.
Ok, maybe tomorrow I can try to dig a little deeper.
@kasulachetu Have a look at the dev branch, I have fixed this and added some range examples to the documentation page.
Your changes fixed the issue. Is this the documentation page you are referring to? http://trentrichardson.com/examples/timepicker/
The documentation in the dev branch is the one I was referring to, it is in dist/index.html. Once I merge dev with master I will update the live website with the latest stable version/docs.
I am running to issues with adding value attribute to the input field. If I set the value attribute on the input field, the timepicker is not displaying the value in the input field, but it reads the value for the timepicker. See the example code on jsfiddle: http://jsfiddle.net/kasulachetu/7fug98m3/3/
HTML:
jQuery:
How can I fix it?