Pasteur Miranda
Posts: 0
Joined: Thu Aug 01, 2013 2:59 am

How can I change time format in Mobiscroll datetime picker from ampm to 24, as well as set date, time and date format?

Hi,

How can I change time format in Mobiscroll datetime picker from AMPM to 24, as well as set date, time and date format?

Thank you.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

How can I change time format in Mobiscroll datetime picker from ampm to 24, as well as set date, time and date format?

It's 3d party widgets (one of the users created a plug-in). It's best to check the widget docs.

Pasteur Miranda
Posts: 0
Joined: Thu Aug 01, 2013 2:59 am

How can I change time format in Mobiscroll datetime picker from ampm to 24, as well as set date, time and date format?

Hi Max,

I found the Mobscroll API documentation. Is there a plugin-specific documentation?

Code: Select all

Thanks
Pasteur Miranda
Posts: 0
Joined: Thu Aug 01, 2013 2:59 am

How can I change time format in Mobiscroll datetime picker from ampm to 24, as well as set date, time and date format?

Hi Max,

Code: Select all

I wrote the following code, trying to set date and time formats and get the now date (the code is within page load event): 

addScroller('datetime', Tiggzi('Datetime1Lbl'));

$('#Datetime1Lbl').mobiscroll().datetime({
minDate: new Date(now.getFullYear(), now.getMonth(), now.getDate()),
display: 'modal',
animate: 'pop',
mode: 'mixed',

Code: Select all

 dateFormat: 'yy-mm-dd', 
 timeFormat: 'HH:ii:ss', 
 timeWheels: 'HHii' 

});

Datetime1Lbl is a label.
It's not working.It's because the $('#Datetime1Lbl') reference to the mobiscroll object is wrong (it's a label) . Do you know what reference should I use to get the right mobscroll object? It seems confusing to me, because the method addscroller creates a mobiscroll object but do not create any reference to it. So, I can't handle and set the right parameters. Is there any other way of creating the mobiscroller (not using "addScroller('datetime', Tiggzi('Datetime1Lbl'));")?

Code: Select all

Thank you very much.
maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

How can I change time format in Mobiscroll datetime picker from ampm to 24, as well as set date, time and date format?

[quote:]
Is there any other way of creating the mobiscroller (not using "addScroller('datetime', Tiggzi('Datetime1Lbl'));")?
[/quote]
I'm not sure to be honest with you... I didn't work on this plug-in. Instead of using Appery function (Tiggzi in the code), you can use jQuery select directly.

Return to “Issues”