Skip to content
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

Method is missing to update time #74

Closed
jaimestuardo opened this issue Jul 13, 2018 · 0 comments
Closed

Method is missing to update time #74

jaimestuardo opened this issue Jul 13, 2018 · 0 comments

Comments

@jaimestuardo
Copy link

jaimestuardo commented Jul 13, 2018

I have encountered the problem that if the input is being set by other mechanism, the time of the control is not refreshed, so I have added the following public method to refresh the time from the current INPUT value:

_update: function () { var currentTime = $(this.element).val().replace(/ /g, ''); if (currentTime != '') this.options.now = currentTime; var time = this.timeArrayFromString(this.options.now); this.options.now = new Date(today.getFullYear(), today.getMonth(), today.getDate(), time[0], time[1], time[2]); this.selectedHour = this.parseHours(this.options.now.getHours()); this.selectedMin = this.parseSecMin(this.options.now.getMinutes()); this.selectedSec = this.parseSecMin(this.options.now.getSeconds()); this.selectedMeridiem = this.parseMeridiem(this.options.now.getHours()); }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant