Autoclose calendar popup window in reports

hi,

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 @@
             $('.nav-tabs').tab();
             $('.tip').tooltip();
 
-            $('.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.

Miquel

Hey

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

hi,

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.

Miquel

I meant this: https://github.com/InvoicePlane/InvoicePlane/commit/8a179be86d04c45650fa5d47fe5cb98b9f62795f
Now this problem can’t happen anymore :slight_smile:

Great! now this issue can be closed :lock:

Miquel