Pricing changes are coming in January. Contact our Sales team to secure the current price for your desired license.

How to properly display month in safari environment

Answered
Yohei asked on November 1, 2024

When I set the type to "date string" and used the "yyyy/mm" format in Safari,

the date was displayed as an invalid date.

Is it recommended to use "string" instead of "date string" for type to prevent this?

We are not currently considering using "yyyy-mm".

2 answers

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster November 1, 2024

Hello,

Thank you for reaching out to us.

The date is displayed as an invalid date because Flexmonster does not support both "yyyy/mm" and "yyyy-mm" input formats. Kindly note that Flexmonster supports the following input date formats:

  1. ISO 8601. For example:
    • "2021-04-25" – Date.
    • "2021-04-25T21:30:05" – Date and time.
    • "2021-04-25T21:30:05+03:00" – Date and time with a time zone.
  2. Unix timestamp in milliseconds. For example, "2021-04-25" is 1619298000000 when converted to a Unix timestamp in milliseconds.

The input format of the date should only be ISO 8601 or Unix timestamp. This way, the dates will be displayed in all the browsers.

If you want to display the date in "yyyy/mm" formats on the grid, you can set the necessary format in the Report object. For example:

report: {
// other configurations
options: {
datePattern: "yyyy/MM",
}
}

Please check the following JSFiddle for reference: https://jsfiddle.net/flexmonster/vdymgkjz/. You are welcome to check the following guide for reference: https://www.flexmonster.com/doc/date-and-time-formatting/.

Please let us know if it works for you. Looking forward to hearing your feedback.

Kind regards,
Nadia

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster November 19, 2024

Hello Yohei,

Hope you are doing well.

We were wondering if you had a chance to check the suggested approach. Could you please confirm if it works for you?

Looking forward to hearing from you.

Kind regards,
Nadia

Please login or Register to Submit Answer