- Add DatePrompt
- Enter a valid name in the name propety of the prompt. f.e: StartDate
- Add a HTML block to ritght of the prompt
- Enter the following JavaScript block
- <script language="javascript">
var dDate = new Date();
//Subtract one day
dDate.setDate(dDate.getDate()-1);
if (dDate.getDay() ==0) {
dDate.setDate(dDate.getDate() -2);
}
if (dDate.getDay() ==6) {
dDate.setDate(dDate.getDate() -1);
}
pickerControlStartDate.setValue(getFormatDate(dDate, 0 , 'YMD'));
</script> - If your prompt has different name change the bold part in the script
Showing posts with label workingday. Show all posts
Showing posts with label workingday. Show all posts
Monday, April 11, 2016
Setting Dateprompt to Previous WorkingDay
Subscribe to:
Posts (Atom)