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

The Archive Base Latest Questions

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

I am working with a Jquery time picker from http://labs.perifer.se/timedatepicker/ In the view I

  • 0

I am working with a Jquery time picker from http://labs.perifer.se/timedatepicker/

In the view I have this time picker control.

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

If a particular time (say 11:00 AM) is picked previously (and saved in db) that particular option should be disabled and not available for subsequent selections. In a MVC controller, via a service layer, I am getting a ‘list’ of all previously picked times.

    public ActionResult DisableTimes(param1, param2)
    {            
        List<string> listTimes = Webservice(param1,param2);
        //getting previously saved times - above line
        return Json(listTimes, JsonRequestBehavior.AllowGet);
    }

I am making an ajax call in a java script function like this.. that passes the parameters to MVC controller and returns back the list of times.

       $.ajax({

          "url": "/ControllerName/DisableTimes/",
          "type": "get",
          "dataType": "json",
          "data": { param1: $("#paramval1").val(), param2: $("#paramvalue2").val() },
          "success": function (listTimes) {

              //Code here - use the listTimes values and disable the 
              //appropriate timepicker drop down choices.
               }
           });

How can I make use of the list of times “listTimes” I am getting from controller to disable the Jquery Timepicker choices?

  • 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-04T16:26:43+00:00Added an answer on June 4, 2026 at 4:26 pm

    You should just be able to remove the li’s from available options in the following manner:

    $(listTimes).each(function() {
        $('.time-picker').find('li:contains("' + this + '")').remove();
    });
    

    Edit:

    It will be a little bit harder if you have multiple time pickers on a page though. You should be able to add the :first selector to only get the first time picker.

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

    Live DEMO

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

Sidebar

Related Questions

I'm working with jQuery for the first time and need some help. I have
I'm using the jQuery DatePicker control for the first time. I've got it working
Working with jquery.ajax for first time... I have a class in C#: public class
I have this script working with jquery and uploadify $('#uploader').uploadify({ 'uploader' : '/admin/includes/uploadify/uploadify.swf', 'script'
Using jeditable jQuery plugin along with the timepicker plugin. (custom inputs Time Picker 2
I am working with the jquery UI spinoff plugin selectmenu from this github and
I've been looking at this code: http://www.jquery4u.com/jquery-date-and-time-2/online-jquery-stopwatch/ I'm trying to understand exactly how it
http://loopj.com/jquery-tokeninput/ The code I am working with is from a jquery-tokeninput fork which allows
This is my first time attempting working with JQuery, Json AND calling a web
I have been working on this site for some time and just launched it

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.