This is a migrated thread and some comments may be shown as answers.

Items not clickable

2 Answers 120 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
Edemilson
Top achievements
Rank 1
Edemilson asked on 29 Aug 2012, 08:34 AM
Hi there! I configured DatePicker, and everything worked, but when I try to click on a year, month or a day it does nothing... The buttons in the header are working fine. The link in the footer works too, when I set the max to a future date. But the rest is disabled... Below is the my actual HTML code (before and after the widget reshape it), and also the Javascript code. I have an extra <span> tag that is used by jQuery Validate plug-in. I disabled it to see if maybe it is the cause, but nothing changed.

<p><label for="birthday">Data de nascimento:</label><br>
<input type="text" id="BIRTHDAY" name="BIRTHDAY" value="1979-04-17" maxlength="10" class="valid"><span> </span><span for="BIRTHDAY" generated="true" class="error checked" style=""> </span></p>

<p><label for="birthday">Birthday:</label><br>
<span style="" class="k-widget k-datepicker k-header"><span class="k-picker-wrap k-state-default"><input type="text" id="BIRTHDAY" name="BIRTHDAY" value="1979-04-17" maxlength="10" data-role="datepicker" style="width: 100%; " class="k-input"><span unselectable="on" class="k-select"><span unselectable="on" class="k-icon k-i-calendar">select</span></span></span></span><span> </span></p>

$(document).ready(function() {
 
    // build datepicker
    $('#BIRTHDAY').kendoDatePicker({
        start: 'decade',
        depth: 'month',
        footer: "Today: #=kendo.toString(data, 'yyyy-MM-dd') #",
        format: 'yyyy-MM-dd',
        parseFormats: ['yyyy-MM-dd', 'dd/MM/yyyy'],
        min: new Date(1900, 0, 1),
        max: new Date(new Date().getFullYear() - 18, new Date().getMonth(), new Date().getDay())
    });
 
}

Any idea why is this happening?

2 Answers, 1 is accepted

Sort by
0
Edemilson
Top achievements
Rank 1
answered on 29 Aug 2012, 09:08 PM
I just noticed this attribute unselectable="on" in the generated HTML... Maybe is it related with the problem? I checked the whole documentation but I do not found anything about it. Could anybody give me a clue to solve this?
0
Edemilson
Top achievements
Rank 1
answered on 30 Aug 2012, 03:25 AM
After a lot of try and error, I found the problem. I was using an outdated version of jQuery Validate plugin. Even if I don't use it in the form, if its JS file is loaded, the datepicker stops working... Well, case closed.
Tags
Date/Time Pickers
Asked by
Edemilson
Top achievements
Rank 1
Answers by
Edemilson
Top achievements
Rank 1
Share this question
or