Created
December 20, 2020 15:13
-
-
Save afro-coder/f298035fc557ae4cafc5092db40154ee to your computer and use it in GitHub Desktop.
Automating exenta and RadDatepicker using Javascript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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