Author Topic: TIP: Set Default Date Prompt to Day - 1  (Read 4253 times)

Offline zaith

  • Full Member
  • ***
  • Join Date: Aug 2007
  • Posts: 7
  • Forum Citizenship: +1/-0
TIP: Set Default Date Prompt to Day - 1
« on: 20 Nov 2007 10:17:05 am »
Create a Date Prompt with ID 'PromptDate'
Insert HTML Item in prompt page.
inner HTML Item insert:
Quote
<script language="javascript">
var dDate = new Date();
//Subtract one day
dDate.setDate(dDate.getDate()-1);
//setValue adjust current date in prompt
pickerControlPromptDate.setValue(getFormatDate(dDate, 0 , 'YMD'));
</script>

All Done. You give default prompt for Previous Day

Offline djknuddel

  • Associate
  • **
  • Join Date: Aug 2008
  • Posts: 3
  • Forum Citizenship: +0/-0
Re: TIP: Set Default Date Prompt to Day - 1
« Reply #1 on: 19 Aug 2008 09:53:22 am »
I have done so and get the error message:

'pickerControlPromptDate' is not defined.

What do you mean with ID? The name or the parameter of the prompt? I have changed the name of the prompt to "PromptDate".

 


       
Twittear