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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:10:57+00:00 2026-06-13T03:10:57+00:00

I’m working on a project in which I’m using jQuery’s UI Datepicker heavily. However,

  • 0

I’m working on a project in which I’m using jQuery’s UI Datepicker heavily. However, one of the fields requires a time as well, and the client would like to use an iPhone-like timepicker in addition to the original date picker. (Otherwise, I’d use this — http://trentrichardson.com/examples/timepicker/ — which is brilliant but doesn’t have the visual style needed.)

I found this plugin — http://demo.mobiscroll.com/#demo=time&mode=mixed&display=inline&theme=jqm — and I’m working on somehow integreating it with the jQuery UI plugin, placing it under the calendar table and somehow sending the data from this in addition to the date pushed from the datepicker.

Here is my datepicker initilization code:

<script type="text/javascript" src="/js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="/js/jquery-ui-1.8.18.custom.min.js"></script>

function datepickerAdd() {
        $('input[name=valueTextField]').addClass('datepicker');

            $( ".datepicker" ).datepicker({
                defaultDate: "+1w",
                maxDate: "0d+",
                dateFormat: "m/d/yy"
                });

                $(function(){
                    $('#i').scroller({
                        preset: 'time',
                        theme: 'jqm',
                        display: 'inline',
                        mode: 'mixed'
                    });    
                });

            $('.datepicker').datepicker().bind('click keyup', function() {
                if ($('#ui-datepicker-div :last-child').is('table'))
                    $('#ui-datepicker-div').append('<input id="i" name="i" style="display:none" />');
            });
    }

I can of course include other scripts, I just placed my jquery library up there so they don’t get confused with one another.

Can anyone out there help or have an easy selection? If it’s not mobiscroll, that’s fine as well, just something that allows you to either scroll or use arrows to move the time around is fine.

  • 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-13T03:10:58+00:00Added an answer on June 13, 2026 at 3:10 am

    Your mobiscroll initialization is in a wrong place ( is not in the DOM yet.
    Here is a proposed solution:

    function addTimePicker() {
        setTimeout(function() {
            if ($('#ui-datepicker-div :last-child').is('table'))
                $('<div id="mobiscroll"></div>').appendTo($('#ui-datepicker-div')).scroller({
                    preset: 'time',
                    theme: 'ios',
                    display: 'inline'
                });
        }, 10); 
    }
    
    $('#test').datepicker({
        defaultDate: "+1w",
        maxDate: "0d+",
        dateFormat: "m/d/yy",
        onSelect: function(dateText) {
            alert('Time: ' + $.scroller.formatDate('hh:ii A', $('#mobiscroll').scroller('getDate')));
        },
        beforeShow: addTimePicker,
        onChangeMonthYear: addTimePicker // when changing month, mobiscroll must be re-initialized
    });
    

    ​
    Although this seems a messy solution, i wouldn’t mix jquery UI timepicker with mobiscroll.
    Mobiscroll has datetimepicker as well, or stick to the proposed datetimepicker for jquery UI.

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

Sidebar

Related Questions

I am reading a book about Javascript and jQuery and using one of the
I'm making a simple page using Google Maps API 3. My first. One marker
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I would like to run a str_replace or preg_replace which looks for certain words
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this

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.