Changed move_out to use datepicker in the same way as move_in. I'll probably be wiping this out later to have move_out behave more like move_in and present customer and unit selection boxes.
git-svn-id: file:///svn-source/pmgr/branches/invoice_receipt_20090629/site@273 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -45,6 +45,7 @@ echo '<P><BR>' . "\n";
|
||||
|
||||
// Reset the form
|
||||
function resetForm() {
|
||||
datepickerNow('LeaseMoveoutDate', false);
|
||||
}
|
||||
--></script>
|
||||
|
||||
@@ -79,8 +80,9 @@ echo $this->element('form_table',
|
||||
array('class' => "item move-out entry",
|
||||
'field_prefix' => 'Lease',
|
||||
'fields' => array
|
||||
("moveout_date" => array('opts' => array('type' => 'text',
|
||||
'id' => 'datepicker')),
|
||||
("moveout_date" => array('opts' => array('type' => 'text'),
|
||||
'between' => '<A HREF="#" ONCLICK="datepickerNow(\'LeaseMoveoutDate\', false); return false;">Now</A>',
|
||||
),
|
||||
)));
|
||||
|
||||
// Set up a redirect page. I use lower case 'redirect' here
|
||||
@@ -97,11 +99,12 @@ echo $form->end('Perform Move Out');
|
||||
|
||||
<script type="text/javascript"><!--
|
||||
$(document).ready(function(){
|
||||
$("#datepicker").datepicker({ constrainInput: true,
|
||||
numberOfMonths: [1, 1],
|
||||
showCurrentAtPos: 0,
|
||||
dateFormat: 'mm/dd/yy' })
|
||||
.datepicker('setDate', '+0');
|
||||
$("#LeaseMoveoutDate")
|
||||
.attr('autocomplete', 'off')
|
||||
.datepicker({ constrainInput: true,
|
||||
numberOfMonths: [1, 1],
|
||||
showCurrentAtPos: 0,
|
||||
dateFormat: 'mm/dd/yy' });
|
||||
|
||||
resetForm();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user