parmarmayur9090 / jquery-datepicker

Automatically exported from code.google.com/p/jquery-datepicker
0 stars 0 forks source link

Inline mode | Mutliple select - select today ok, unselect not possible #301

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
Run jQuery in "jQuery.noConflict()" mode with a prototype.js included.

Generate an inline calendar with these options:

<code>
var calContainer = document.getElementById("calendar-container");
jQuery(calContainer).datePicker(
        {
            inline:true, 
            selectMultiple:true, 
            startDate: new Date(),
            numSelectable:3
        }
    ).bind(
            'dateSelected',
            function(e, selectedDate, $td, state)
            {       
                console.log((state ? '' : 'un') + 'selected ' + selectedDate);
                    updateDatesField(jQuery(calContainer).dpGetSelected());

            }
    );
</code>

What is the expected output? What do you see instead?
When clicking on other dates than the "today" date, slection and unselection is 
possible. After once selecting today, this date item is not clickable anymore. 
Thus not unselectable.

Please provide a URL to a page displaying the problem.
http://www.christian-polzer.de/dptest/
Please see source code for comments.

What version of the datepicker are you using? On what operating system? And 
Which Browser?

DatePicker Version: $Id: jquery.datePicker.js 103 2010-09-22 08:54:28Z
OS: Win7/OSX
Browser: Chrome (13.0.782.112 m), FireFox (5.0)

Please provide any additional information below.
Compressed WebDirectory from above link is attached for backup purposes.

Regards, Chris!

Original issue reported on code.google.com by christia...@gmail.com on 16 Aug 2011 at 9:23

Attachments:

GoogleCodeExporter commented 8 years ago
Sorry, a small error was included with the example link: a js method is called, 
which isn't defined. removed it from the weblink's source code, but it is still 
present.

Original comment by christia...@gmail.com on 16 Aug 2011 at 9:28

GoogleCodeExporter commented 8 years ago
I can't see what is happening with the error on the demo page. Can you fix the 
error and re-upload?

Also, I notice that you have an onload attribute on the body tag. This could 
possibly interfere with jQuery's own onload/ready stuff. Try removing it and 
making the script at the top of your page look something like this:

jQuery.noConflict();
jQuery(window).bind(
    'load',
    function()
    {
        jQuery(jQuery('#calendar-container')).datePicker(
                {
                    inline:true,
                    selectMultiple:true,
                    startDate: new Date(),
                    numSelectable:3
                }
            ).bind(
                    'dateSelected',
                    function(e, selectedDate, $td, state)
                    {
                        console.log((state ? '' : 'un') + 'selected ' + selectedDate);

                    }
            );
    }
);

Original comment by kelvin.l...@gmail.com on 16 Aug 2011 at 8:04