Skip to content

Setters for hourMin, hourMax and stepMinute do not work #195

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

Open
kiroff opened this issue Jul 7, 2011 · 4 comments
Open

Setters for hourMin, hourMax and stepMinute do not work #195

kiroff opened this issue Jul 7, 2011 · 4 comments

Comments

@kiroff
Copy link

kiroff commented Jul 7, 2011

Hi,

First of all thanks for your work, looks very useful for me!

Second I'm trying do set the above fields dynamically (using 0.9.5), after the datetimepicker had been initialised and before it appears using:

$(params[0]).datetimepicker("option", "hourMin", 8);
$(params[0]).datetimepicker("option", "hourMax", 22);
$(params[0]).datetimepicker("option", "stepMinute", 15);

with no luck. If I pass this options when datepicker is initialised it works.

Tried the dev branch rev b53bf32 - same thing.

@yanickrochon
Copy link

in fact, there doesn't seem to have any setter method on this widget.... I tried updating the minDate, and seeing that it did nothing, I look into the code to notice that the code did not follow the jQuery UI widget factory. This code should be refactored to follow the guidelines and could very well be presented as an update to the current datepicker widget.

Nice work, though.

@TatianaTyu
Copy link

stepMinute does not work for me either,
so does minuteGrid

@TatianaTyu
Copy link

Hey guys, looks like settings' order is important. When I put stepMinute setting to the end like this (in CoffeeScript):

$(".datetime").datetimepicker(
dateFormat: 'M d, yy',
showOtherMonths: true,
selectOtherMonths: true,
showButtonPanel: false,
numberOfMonths: 2,
ampm: true,
timeFormat: 'hh:mm TT',
hourGrid: 2,
minuteGrid: 10,
stepHour: 1,
stepMinute: 5
)

... then it does not work. But when I put it to the beginning, it does.

@keithnicholson
Copy link
Contributor

I believe this was fixed with 1.0.2. Give it a try now. Using options should work.

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

4 participants