-
Notifications
You must be signed in to change notification settings - Fork 1k
Plugin is truncating the time value from the initial datetime value from the text field #750
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
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 ( |
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? |
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?
The text was updated successfully, but these errors were encountered: