Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Automating exenta and RadDatepicker using Javascript
(function(){
// Click on Apply for WFH button
$('#lnkApplyODRequest').click()
//Set the WFH type
$('#ctl00_mainContent_ApplyOD_ddlOdtype').val(1)
// Day type
$('#ctl00_mainContent_ApplyOD_ddlDayType').val(1);
// Setting the Date. It HAS TO BE (current month(12) - 1)
// YYYY,(MM-1),DD
var fromDate=new Date()
fromDate.setFullYear(2020,11,07)
var toDate=new Date()
toDate.setFullYear(2020,11,11)
//The left hand side datepicker
fromInput=$find('ctl00_mainContent_ApplyOD_raddatefromrequest')
//Right hand side datepicker
toInput=$find('ctl00_mainContent_ApplyOD_raddateToRequest')
var datepickerl=window.fromInput
var datepickerr=window.toInput
datepickerl.get_dateInput().set_selectedDate(fromDate)
datepickerr.get_dateInput().set_selectedDate(toDate)
setTimeout(function(){
$('.startTimeR').val('10:00 am');
$('.endTimeR').val('7:00 pm');
$('textarea').val('WFH');},5000);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment