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

  • Home
  • SEARCH
  • 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 3698728
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T05:01:02+00:00 2026-05-19T05:01:02+00:00

Im using a calendar plugin for jQuery, im using the ‘selecting multiple dates’ demo

  • 0

Im using a calendar plugin for jQuery, im using the ‘selecting multiple dates’ demo which is here http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerMultiple.html

Im using the demo code for starters which is as follows:

<script type="text/javascript" charset="utf-8">
$(function()
{
    $('.date-pick')
        .datePicker(
            {
                createButton:false,
                displayClose:true,
                closeOnSelect:false,
                selectMultiple:true
            }
        )
        .bind(
            'click',
            function()
            {
                $(this).dpDisplay();
                this.blur();
                return false;
            }
        )
        .bind(
            'dateSelected',
            function(e, selectedDate, $td, state)
            {
                console.log('You ' + (state ? '' : 'un') // wrap
                    + 'selected ' + selectedDate);

            }
        )
        .bind(
            'dpClosed',
            function(e, selectedDates)
            {
                console.log('You closed the date picker and the ' // wrap
                    + 'currently selected dates are:');
                console.log(selectedDates);
            }
        );
});
</script>

This works great, i want to be able to pre select dates somehow, im getting dates from the database, and i want to be able to show them as checked when i click the link to open the calendar.

If anyone has any experience with this, i would love some help … im not a jQuery nut at all, so its hard to figure this out.

Cheers,

  • 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-05-19T05:01:03+00:00Added an answer on May 19, 2026 at 5:01 am

    You can call the dpSetSelected method to set the dates you need, one at a time

    Whatever code you use to get the list of dates from the database, run loop over them

    var arrDates = ['01/01/2010', '01/05/2010', '01/10/2010'];
    var dp = $('.date-picker');
    for(var i = 0; i < arrDates.length; i++){
        dp.dpSetSelected(arrDates[i]);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using a JQuery plugin to render a calendar ( http://arshaw.com/fullcalendar/ ). Problem
I am currently trying to implement the wonderful jQuery plugin 'week calendar' ( here
Got the jQuery UI datepicker plugin working wonderfully, however, when using IE7, the calendar
I'm using the Jquery full calendar plugin, and i want to be able to
i'm using successfully a jquery datepicker with masked input plugin too in a aspx
We are using Calendar. roll to either move the dates up or down. The
How to create a calendar using XML
Anyone know a simple way using Java calendar to subtract X days from a
I am using the AJAX Control Toolkit Popup Calendar Control in a datagrid. When
I am using MS AJAX ASP.NET Components (Calendar Extender) and I'm finding this problem.

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.