Modified the datepickerNow() function to return results without the time (just date). Updated the move_in datepicker to use it and added a link for the user.
git-svn-id: file:///svn-source/pmgr/branches/invoice_receipt_20090629@272 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -145,17 +145,21 @@ function fmtCurrency(amount) {
|
||||
//
|
||||
// Datepicker helpers
|
||||
|
||||
function datepickerNow(id) {
|
||||
function datepickerNow(id, usetime) {
|
||||
now = new Date();
|
||||
// datepicker seems to squash the time portion,
|
||||
// so we have to pass in a copy of now instead.
|
||||
$("#"+id).datepicker('setDate', new Date(now));
|
||||
$("#"+id).val($("#"+id).val()
|
||||
+ ' '
|
||||
+ (now.getHours() < 10 ? '0' : '')
|
||||
+ now.getHours() + ':'
|
||||
+ (now.getMinutes() < 10 ? '0' : '')
|
||||
+ now.getMinutes());
|
||||
if (usetime == null)
|
||||
usetime = true;
|
||||
$("#"+id).val($("#"+id).val() +
|
||||
(usetime
|
||||
? (' '
|
||||
+ (now.getHours() < 10 ? '0' : '')
|
||||
+ now.getHours() + ':'
|
||||
+ (now.getMinutes() < 10 ? '0' : '')
|
||||
+ now.getMinutes())
|
||||
: ''));
|
||||
}
|
||||
|
||||
function datepickerSet(fromid, id, a, b) {
|
||||
|
||||
Reference in New Issue
Block a user