All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:
<
telerik:RadDateTimePicker
ID
=
"RadDateTimePicker"
runat
"server"
onkeydown
"key(event);"
>
TimeView
TimeFormat
"HH:mm"
</
<script type=
"text/javascript"
function
key(e) {
var
picker = $find(
"<%=RadDateTimePicker.ClientID%>"
);
//get the selected date and time
arr = picker._dateInput.get_value().split(
' '
date = $.trim(arr[0]);
//date
time = $.trim(arr[1]);
//time(both hour and minute)
temp = time.split(
':'
hr = temp[0];
//hour
min = temp[1];
//minute
am = $.trim(arr[2]);
if
(e.keyCode == 38) {
//upkey press
min = parseInt(min) + 15;
// minute is incremented by 1
picker._dateInput.set_value(date +
" "
+ hr +
":"
+ min +
+
+ am);
}
else
(e.keyCode == 40) {
//down keypress
min = parseInt(min) - 15;
// minute is decremented by 1
</script>