ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: neoinbiz on August 08, 2023, 06:15:03 pm

Title: Date of export
Post by: neoinbiz on August 08, 2023, 06:15:03 pm
I want to be able to add the date the export was done.
Example: When a user clicks export button, I want to capture today's date and include it in the report and place in a row or title so it is visible.
Title: Re: Date of export
Post by: paramvir on August 08, 2023, 10:43:37 pm
1) you can get current date with new Date() and format it to mm/dd/yy with jqueryui formatdate api: $.datepicker.formatDate

https://api.jqueryui.com/datepicker/

2) Export the pqgrid to js workbook, update any cell value with above date and export it to xlsx.
Title: Re: Date of export
Post by: neoinbiz on August 08, 2023, 10:48:58 pm
Well that is close. My objective was during the export the date is injected into a row or somewhere on the workbook dynamically once you hit export button.
Title: Re: Date of export
Post by: paramvir on August 08, 2023, 10:56:19 pm
above logic is for injecting the date dynamically into the workbook, you can place this in click event handler of button.