7 Answers, 1 is accepted
0
Hello,
Once you have a reference to the client-side object of the control:
http://www.telerik.com/help/aspnet-ajax/calendar-client-side-basics.html
You can use the get_selectedDate() method to get the requested information:
http://www.telerik.com/help/aspnet-ajax/calendar-client-side-rad-timepicker.html
Hope this helps.
Regards,
Eyup
Telerik
Once you have a reference to the client-side object of the control:
http://www.telerik.com/help/aspnet-ajax/calendar-client-side-basics.html
You can use the get_selectedDate() method to get the requested information:
http://www.telerik.com/help/aspnet-ajax/calendar-client-side-rad-timepicker.html
Hope this helps.
Regards,
Eyup
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0
SR
Top achievements
Rank 1
answered on 17 Oct 2014, 09:36 AM
Hello,
I am using this function but unable to get time from time picker can u check this
function OnDateSelected(tpCheckIn, tpCheckOut) {
// access the control and set the label value
var grid = $find("<%= grid.ClientID %>");
try {
var tableView = grid.get_masterTableView();
var items = tableView.get_dataItems();
for (var i = 0; i < items.length; i++) {
var rowValues = items[i];
var pkr1= rowValues.findElement("picker1");
var pkr2= rowValues.findElement("picker2");
var time = pkr1.get_selectedDate();// here i am getting the error "Object doesn't support property or method 'get_selectedDate'"
//var time = pkr1.get_selectedDate();/using this one also unable to get the time from picker
}
}
catch (e) {
}
}
I am using this function but unable to get time from time picker can u check this
function OnDateSelected(tpCheckIn, tpCheckOut) {
// access the control and set the label value
var grid = $find("<%= grid.ClientID %>");
try {
var tableView = grid.get_masterTableView();
var items = tableView.get_dataItems();
for (var i = 0; i < items.length; i++) {
var rowValues = items[i];
var pkr1= rowValues.findElement("picker1");
var pkr2= rowValues.findElement("picker2");
var time = pkr1.get_selectedDate();// here i am getting the error "Object doesn't support property or method 'get_selectedDate'"
//var time = pkr1.get_selectedDate();/using this one also unable to get the time from picker
}
}
catch (e) {
}
}
0
Accepted
Hello,
Please try using the findControl method instead of findElement and let me know about the result.
Regards,
Eyup
Telerik
Please try using the findControl method instead of findElement and let me know about the result.
Regards,
Eyup
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0
SR
Top achievements
Rank 1
answered on 17 Oct 2014, 12:00 PM
Thanks Eyup
it's working but i have to show pkr2 text with redcolor y bcz pkr2 time should be greater than pkr1,
when user enter wrong time text should be shows with redcolor.
Regards
SR.
it's working but i have to show pkr2 text with redcolor y bcz pkr2 time should be greater than pkr1,
when user enter wrong time text should be shows with redcolor.
Regards
SR.
0
Hello SR,
You can access the TextBox by using the _dateInput private property and change the styles. Please check out the following code snippet.
Regards,
Kostadin
Telerik
You can access the TextBox by using the _dateInput private property and change the styles. Please check out the following code snippet.
var
input1 = pkr1._dateInput;
var
input2 = pkr2._dateInput;
Regards,
Kostadin
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0
SR
Top achievements
Rank 1
answered on 28 Oct 2014, 01:16 PM
can you please elaborate the steps please
var timepicker1= rowValues.findControl("pkr1");
pk1= timepicker1.get_selectedDate();// here i am getting the selected time but unable to set text color as red
using the javascript function .
Regards,
SR.
var timepicker1= rowValues.findControl("pkr1");
pk1= timepicker1.get_selectedDate();// here i am getting the selected time but unable to set text color as red
using the javascript function .
Regards,
SR.
0
Hello SR,
There is a property which display the date as invalid. I would recommend you to use it in your case. For this purpose you have to use the following approach.
Regards,
Kostadin
Telerik
There is a property which display the date as invalid. I would recommend you to use it in your case. For this purpose you have to use the following approach.
function
OnDateSelected(sender, args) {
var
timepicker1 = rowValues.findControl(
"pkr1"
);
timepicker1.get_dateInput().set_invalid(
true
)
}
Regards,
Kostadin
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.