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

TimePicker issue - Not min?

1 Answer 26 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
Christian
Top achievements
Rank 1
Christian asked on 14 Aug 2012, 12:38 AM
Hi,
i'm trying to fix a code that resets the "end time" minimum value to be half hour more than the "begin time".

var value = $("#begin").data("kendoTimePicker").value();
var end = $("#end").data("kendoTimePicker");
 
                if(value.getHours().toString() == "18" && value.getMinutes().toString() == "30")
                {
                    var minimo = new Date(value.getTime() + 30*60000);                   
                    end.value(minimo);
                    end.enable(false);
                }
                else
                {
                    var minimo = new Date(value.getTime() + 30*60000);
                    end.min(minimo);
                    end.enable(true);
                }

For some reason, the code ends in error because it says that "min is not a function". In the docs it says it is? Is this some kind of bug of some sort?

Don't think it's due to wrong reference because the value function works. Can you help me here?

1 Answer, 1 is accepted

Sort by
0
David Beck
Top achievements
Rank 1
answered on 15 Aug 2012, 12:54 AM
Hi Christian,

you declaration for end and start needs to be like this you missing one 'kendoTimePicker()'

var end = $("#end").kendoTimePicker().data("kendoTimePicker");
Tags
Date/Time Pickers
Asked by
Christian
Top achievements
Rank 1
Answers by
David Beck
Top achievements
Rank 1
Share this question
or