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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T17:40:43+00:00 2026-06-04T17:40:43+00:00

I have 2 Jquery timePickers on a page. timePicker plug in is from http://labs.perifer.se/timedatepicker/

  • 0

I have 2 Jquery timePickers on a page. timePicker plug in is from http://labs.perifer.se/timedatepicker/

In the view I have these two time picker controls -.

$("#time1, #time2").timePicker({
        startTime: "09.00", 
        endTime: new Date(0, 0, 0, 19, 0, 0), 
        show24Hours: false,
        separator: '.',
        step: 60
});

“#time1” takes in ‘Beginning of an event’ time. #time2 takes in ‘End of an event’ time. I have MVC , jquery, js code that runs to get me a list of all previously selected ‘time1’s. I am hiding the previously ‘selected & saved’ values in #time1. For example, user saved 9 AM, 10 AM , 11 AM previously. I am getting those values from the database (into a list “listTimes”) and hiding those values in the #time1 control and no more visible.

  $(listTimes).each(function () {

   $('.time-picker:first').find('li:contains("' + this + '")').hide();    
                         });

But if the user picks 9 AM in time1 and 2 PM in time2, thats a 5 hour block. Not only I have to hide 9 AM, I have to hide 10, 11, 12, 1 PM also because its a 5 hour slot. I am able to hide only 9 AM until now. Would like some help in getting the remaining of the hours also hidden. I need to somehow populate the list “listTimes” with all the hours in the duration (time2-time1).

  • 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-04T17:40:46+00:00Added an answer on June 4, 2026 at 5:40 pm

    Something along these lines should work for you:

    var startTime = "09:00";
    var endTime = "11:30";
    var $startTime = $('.time-picker:first').find('li:contains("' + startTime + '")');
    var $currentTime = $startTime.next('li');
    
    $startTime.hide();
    
    while($currentTime.html() != endTime) ​{
        $currentTime.hide();
        $currentTime = $currentTime.next('li');
    }​
    

    Live DEMO

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

Sidebar

Related Questions

I am working with a Jquery time picker from http://labs.perifer.se/timedatepicker/ In the view I
I have this script to pick a date in a form: <script src=http://trentrichardson.com/examples/timepicker/js/jquery-ui-timepicker-addon.js></script> <script>
I am using datimepicker (from: http://trentrichardson.com/examples/timepicker/ ) however I cannot save the picket date-time
I am using a Jquery Timepicker . I have two input fields - to
I have jquery with class= modal i want to call that class when page
I have multiple ajax forms on page that cointain same elemets, I have jquery
I have jQuery similar to this on a view: <script> $(function() { $(#yourID).makeAsyncUploader({ upload_url:
This is the site i work, http://cbtallc.com/test-page/#form On this page, under Date and Time,
Basically I'm using datepicker from jQuery to have my client pick a date. I
I'm using this great jQuery timepicker http://trentrichardson.com/examples/timepicker/ It gives a string something like 07/20/2011

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.