Autoclose calendar popup window in reports


the calendar popup windows in the “Report Options” section remains open upon picking a date, forcing users to click elsewhere outside the popup window to close it. The patch below fixes that behaviour.

Patch for v. 1.1.1:

--- ~current_InvoicePlane/application/modules/layout/views/layout.php
+++ ~new_InvoicePlane/application/modules/layout/views/layout.php
@@ -33,7 +33,7 @@
-            $('.datepicker').datepicker({ format: '<?php echo date_format_datepicker(); ?>'});
+            $('.datepicker').datepicker({ autoclose: true, format: '<?php echo date_format_datepicker(); ?>'});
             $('.create-invoice').click(function() {
                 $('#modal-placeholder').load("<?php echo site_url('invoices/ajax/modal_create_invoice'); ?>");

BTW, all other definitions of datepicker in the code (i.e. all modal invoice and quote modal views) include the “autoclose:true” option.



Really all of them do include this option? Because then we could make this a default value instead.


I have recursively searched (rgrep) for “(’.datepicker’).datepicker(” and all instances under application folder include the “autoclose: true” option except for the above mentioned application/modules/layout/views/layout.php file and the file

  • application/modules/payments/views/modal_add_payment.php

which should be fixed unless, as you have proposed

“autoclose=true” becomes the default behaviour.


I meant this:
Now this problem can’t happen anymore :slight_smile:

Great! now this issue can be closed :lock: