-1

I want to only scroll day hour min using jQuery library mobiscroll, please suggest any solution.

Only scrollmonth and hour using mobiscroll jQuery library.

For more clarification please see below screenshot:

enter image description here

Thank you in advance.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • Welcome to SO. Please look at this article to see how to ask a good question: https://stackoverflow.com/help/how-to-ask – Robert Moskal Jul 12 '17 at 19:30

1 Answers1

0

Since MobiScroll this is a paid plugin, I couldn't test.

But just looking at their examples, something like this should make the hours, minutes and second scroll... But not the date.

$(function () {

    var min = new Date();
    min.setHours(0);
    min.setMinutes(0);
    min.setSeconds(0);

    var max = new Date();
    max.setHours(23);
    max.setMinutes(59);
    max.setSeconds(59);

    $('#demo').mobiscroll().date({
      theme: 'ios',
      display: 'bottom',
      dateWheels: '|MM d yy| hhii A',
      dateFormat: 'mm/d/yy hh:ii A',
      minWidth: 100,
      min: min,
      max: max
    });

});

The trick certainly is to play with min and max.
Maing them today at 00:00:00 and today at 23:59:59, the date sure will not scroll.

Now in your question title, you ask for day, hour and "time"...
And in the question, you ask for month and hours...
And in the image, you ask for hours, minutes and AM/PM.

So this is unclear....
I made it just for time, having a fixed date as today.
But anyway, I guess you can use the same logic if you wanted something different.

Louys Patrice Bessette
  • 33,375
  • 6
  • 36
  • 64