ParamQuery Pro 10.x Upgrade Guide

Overview

This guide is meant to assist in upgrading from ParamQuery Pro v9.x to v10.x. Only changes which are impacted by upgrade are listed below, along with how to upgrade your code. For new features please refer the API and demos.

General Changes

There have been extensive upgrades in number and date formatting to align with mainstream spreadsheet applications like Excel and Google Sheets.

Number format

In previous versions, different symbols for thousand and decimal separators are used based on the locale. For example #,###.00 is used for 'en' locales and #.###,00 is used for 'de' locales.

In this version, the symbols for thousand and decimal separators are fixed regardless of the locale. For example, applying the format #,###.00 to the number 1234567.89 results in:

  • 12,34,567.89 for locale 'en-IN'
  • 1,234,567.89 for locale 'en-US'
  • 1.234.567,89 for locale 'de'
The format locale can be specified using the localeFmt option. If this option is omitted, the result will be adapted based on the user’s locale. This makes applications more portable across various locales.


Date format

In previous versions, date formating via column.format, row and cell formats via Range(...).format() were based on jQueryUI datepicker date syntax.

In this version mainstream Excel like formatting syntax is adopted by PQ Grid for datetime values due to the following reasons:

  • Time formatting: The jQueryUI datepicker component does not support time formatting while Excel datetime format offers a wider range of options.
  • User familiarity: End users are generally more accustomed to Excel’s datetime formatting syntax than jQueryUI’s syntax.
  • Localization: jQueryUI requires loading extra localization files for each language while the new pqgrid API supports localization out of the box without needing additional files.
  • Adaptive localization: The new pqgrid API adapts to the user’s locale by simply omitting the localeFmt option, which jQueryUI localization does not support.

Below table helps in migrating from jQueryUI format to current format

Date Value (ISO) jQueryUI Date Format Code ( old ) Excel Date Format Code ( current ) Result (Example)
2024-10-06 yy-mm-dd yyyy-mm-dd 2024-10-06
2024-10-06 dd/mm/yy dd/mm/yyyy 06/10/2024
2024-10-06 mm/dd/yy mm/dd/yyyy 10/06/2024
2024-10-06 D, d M yy ddd, d mmm yyyy Sun, 6 Oct 2024
2024-10-06 DD, d MM yy dddd, d mmmm yyyy Sunday, 6 October 2024
2024-10-06 d M, yy d mmm, yyyy 6 Oct, 2024
2024-10-06 MM d, yy mmmm d, yyyy October 6, 2024

You may take help of utility function pq.juiToExcel() to convert jUI format to Excel format.