Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8911069
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T03:50:54+00:00 2026-06-15T03:50:54+00:00

I am using mobiscroll on a website as a method for date input. The

  • 0

I am using mobiscroll on a website as a method for date input. The scroller is initiated like this:

$(function(){
var curr = new Date().getFullYear();
$('#date').scroller({
    preset: 'date',
    height: 30,
    width: 20,
    theme: 'default',
    display: 'inline',
    mode: 'scroller',
    dateOrder: 'MD ddyy',
    startYear: curr,
    endYear: curr + 3,
    minDate: new Date(),
    showLabel: false,
    onChange:function(){ upDATE(); }
});    
$('#date').scroller('setValue', [11,9,'2012']);

As you can see, it is initiated with a minimum date (today). My problem occurs when the user attempts to scroll from December of 2012 to January. You would expect the year to scroll ahead to January of 2013, but it doesn’t. Instead, it goes back to the first valid date in the current year. This is not very intuitive.

Does anyone know how to make the scroller behave as expected?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T03:50:56+00:00Added an answer on June 15, 2026 at 3:50 am

    If I understand correctly, you want to scroll the months… and once the month gets to December and then you attempt to scroll past December it should switch to January and increment the year? If that is the case then I do not think Mobiscroll works that way. The way it appears to work is that you independently pick a month, day and year.


    If I am way off on understanding your question then I would suggest setting a minDate and a maxDate and see if that helps (note that the months are zero indexed):

     minDate: new Date(2000, 0, 1),
     maxDate: new Date(2020, 11, 31),
    

    Also, I think it defaults to the actual current year already so I would remove startYear unless you are wanting a different year.


    Edit:
    You could probably use the OnChange event with the SetValue method to increment the year if the previous month was December and the new month is January and decrement the year if the previous month was January and the new month is December.. etc. See http://docs.mobiscroll.com/mobiscroll-core. It does seem like a lot of extra work and overhead though.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using mobiscroll.js and am trying to set a particular date like 14/06/2005.
We are using Mobiscroll on our mobile website and it works just fine, except
We are using Mobiscroll ( http://code.google.com/p/mobiscroll/ ) as Date Picker solution in our smartphone
I am using a jQuery plugin named mobiscroll to select a date, but the
using this http://bl.ocks.org/950642 we can see how to add images to nodes, the question
Using CI for the first time and i'm smashing my head with this seemingly
Using import datetime in python, is it possible to take a formatted time/date string
Using Delphi 2010. I am looking for (possibly) a function or procedure which can
Creating a mobiscroll instance using the following, when I scroll the year wheel it
Using Jenkins or Hudson I would like to create a pipeline of builds with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.