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 9135903
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:52:58+00:00 2026-06-17T08:52:58+00:00

How do I call the onBeforeShow event with mobiscroll? $(‘#starttime’).mobiscroll(‘setValue’, value).time({ theme: ‘jqm’, display:

  • 0

How do I call the onBeforeShow event with mobiscroll?

$('#starttime').mobiscroll('setValue', value).time({
        theme: 'jqm',
        display: 'modal',
        mode: 'clickpick',
        stepMinute: 10,
        onBeforeShow:  
 });

I need to set the time right before it shows. If I try to do it on document ready the input field isn’t ready yet with the value…

Edit

I tried:

$('#starttime').mobiscroll('setValue', value).time({
        theme: 'jqm',
        display: 'modal',
        mode: 'clickpick',
        stepMinute: 10,
        onBeforeShow: function(html, inst) {
            start = $('#starttime').val();
            var a = moment();
            var value = a.format('h:mm A');

            }
        });

but then I’m getting the error: ‘value is not defined’…

  • 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-17T08:52:59+00:00Added an answer on June 17, 2026 at 8:52 am

    You have to provide a callback function.

    $('#starttime').mobiscroll('setValue', value).time({
            theme: 'jqm',
            display: 'modal',
            mode: 'clickpick',
            stepMinute: 10,
            onBeforeShow: function (html, inst) {
                //Gets called before the scroller appears. The function receives the jQuery object containing the generated html and the scroller instance as parameters
            }
     });
    

    http://docs.mobiscroll.com/23/mobiscroll-core

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

Sidebar

Related Questions

I call the following function with a mouseover event but it's not working. My
Every call to the server gets the Accept-Language value, but can I get that
Call me stupid but this thing has been eating away my productive time like
Call A: double Value = Object.Object.Object.Object.DoubleValue; Call B: double Value : Object.DoubleValue; If this
Call to undefined method after upgrading to PHP 5.4.0 mentions a few APC bug-reports
AJAX Call $.ajax({ url: '/api/Inventory', cache: false, type: 'POST', data: json, contentType: 'application/json, charset=utf-8',
I call from a spreadsheet module a function that does some processing in another
I call a function like this: call_facebook(103138046395999, samåkning.se, http://www.facebook.com/samakning, page); call_facebook(16089699074, Jag ska köra
Users call a web service API in my PHP code but don't properly encode
I call this function from with my code-behind: DeleteFile(Server.MapPath(/) + sitemap_index.xml) Public Shared Function

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.