Author Topic: Date of export  (Read 299 times)

neoinbiz

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 22
    • View Profile
Date of export
« 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.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6307
    • View Profile
Re: Date of export
« Reply #1 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.

neoinbiz

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: Date of export
« Reply #2 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.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6307
    • View Profile
Re: Date of export
« Reply #3 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.