Results 1 to 1 of 1
Jul 31, 2006, 14:43 #1
Pressing a button in a form to set date
Before I ask my question, I need to explain why I need to do this. I have an inventory management system, and all inventory is logged in when it is first received. Then when something is done (a repair or what not) on an asset, at this point I need to set a date. The "Repair Date" is not always set when a user is using the form. Otherwise I would autoset the date whenever the form was loaded.
I'm using Jason Moon's DHTML Calendar Script(Found here)
I would like to put a button labeled "Set Date" in the "Repair Date:" section of my form, that when clicked will replace the button with the calendar script, and automatically set it to today's date.
Here is the syntax for the Calendar script: (i was using PHP to throw values into it if the value was already set)
<script>DateInput('repdate', false, 'YYYY-MM-DD','<?=$repdate?>')</script>