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

The input field is not updated for the first click when using "onSelectDate" #349

Open
mb13 opened this issue Oct 21, 2015 · 0 comments
Open

Comments

@mb13
Copy link

mb13 commented Oct 21, 2015

I want to allow only future times since the actual time. I have the following code:

        var now='2015-10-21 16:00';
        .
        .
        .
        onSelectDate:function(ct,$i){
            var temp = ct.getFullYear() + '-' + (ct.getMonth()+1) + '-' + ct.getDate();
            if (now.substr(0,10) != temp) {
                this.setOptions({
                    minTime:'00:00'
                });
            } else { // the day is today
                this.setOptions({
                    minTime:now.substr(11,5) // set today's time
                });
            }
        }

But on the first selection of the day, the input-text is not updated. It is updated if I click the second time. And also sometimes after a certain number of day selection the datetimepicker disappears. How to get rid of these issues?

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