user1692333
user1692333

Reputation: 2597

How to set default time in Mobiscroll?

The main problem is that the project is a bit old and I can't update Mobiscroll and also don’t know the current version of it... My code looks like this:

jQuery('#select-time').mobiscroll().time({
    'timeFormat': 'HH:ii:ss',
    'timeWheels': 'HHiiss',
});

I need to set time to 00:00:00

Upvotes: 0

Views: 841

Answers (1)

Levi Kovacs
Levi Kovacs

Reputation: 1159

You can use the setDate function by passing an arbitrary date and 00:00:00 as the time

$('#demo').mobiscroll().time({
    timeFormat: 'HH:ii:ss',
    timeWheels: 'HHiiss'
});

$('#demo').mobiscroll('setDate', new Date(2015, 0, 0, 0, 0, 0, 0), true);

Upvotes: 1

Related Questions