Considering the following HTML:
Why does the following NOT work (to be specific, it sets the min date for the first date picker only, not all of them):
I know I can do this using a jQuery each loop, which definitely works, but I was interested to know why the above JS wouldn't work to set the min values for all the DatePickers on that page?
See the following dojo:
http://dojo.telerik.com/@Jacques.vanderhoven/ebawO
Thanks,
Jacques
<
input
value
=
""
class
=
"date-depth-year"
><
br
/>
<
input
value
=
""
class
=
"date-depth-year"
><
br
/>
<
input
value
=
""
class
=
"date-depth-year"
><
br
/>
<
input
value
=
""
class
=
"date-depth-year"
><
br
/>
<
input
value
=
""
class
=
"date-depth-year"
><
br
/>
Why does the following NOT work (to be specific, it sets the min date for the first date picker only, not all of them):
<script>
$(
".date-depth-year"
).kendoDatePicker({
start:
"year"
,
depth:
"year"
});
console.log ($(
"[data-role=datepicker]"
).length);
$(
"[data-role=datepicker]"
).data(
"kendoDatePicker"
).setOptions({
min:
"2014/12/01"
});
</script>
I know I can do this using a jQuery each loop, which definitely works, but I was interested to know why the above JS wouldn't work to set the min values for all the DatePickers on that page?
See the following dojo:
http://dojo.telerik.com/@Jacques.vanderhoven/ebawO
Thanks,
Jacques