javascript convert to java
public static void Selectdatefromcalendar() throws InterruptedException {
WebElement DateBox=driver.findElement(By.xpath("//input[@formcontrolname='categoryDateRange']"));
JavascriptExecutor js = (JavascriptExecutor) driver;
js.executeScript("arguments[0].value='01Sep2021-30Sep2021';", DateBox);