Changing date format #3483

Closed
opened 2026-02-05 06:51:05 +03:00 by OVERLORD · 8 comments
Owner

Originally created by @MehdiAliPak on GitHub (Jan 31, 2023).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

hello guys, Is there any way to convert a Gregorian date to a solar one?

Exact BookStack Version

BookStack v22.11.1

Log Content

No response

PHP Version

8.2.0

Hosting Environment

localhost

Originally created by @MehdiAliPak on GitHub (Jan 31, 2023). ### Attempted Debugging - [X] I have read the debugging page ### Searched GitHub Issues - [X] I have searched GitHub for the issue. ### Describe the Scenario hello guys, Is there any way to convert a Gregorian date to a solar one? ### Exact BookStack Version BookStack v22.11.1 ### Log Content _No response_ ### PHP Version 8.2.0 ### Hosting Environment localhost
OVERLORD added the 🐕 Support label 2026-02-05 06:51:05 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Feb 20, 2023):

Hi @MehdiAliPak,
Sorry for my late response, had to check this myself.

It does not seem possible to use solar dates within BookStack.

@ssddanbrown commented on GitHub (Feb 20, 2023): Hi @MehdiAliPak, Sorry for my late response, had to check this myself. It does not seem possible to use solar dates within BookStack.
Author
Owner

@MehdiAliPak commented on GitHub (Feb 26, 2023):

hello, thank you for your response.
can't you just add this option?
or is there any way to add solar date package into Carbon package?

@MehdiAliPak commented on GitHub (Feb 26, 2023): hello, thank you for your response. can't you just add this option? or is there any way to add solar date package into Carbon package?
Author
Owner

@ssddanbrown commented on GitHub (Feb 26, 2023):

It may be possible but I didn't see any direct/simple way that aligns with out usage.
I wouldn't want to add too much for specific handling of solar dates, since it's had little demand.
Depending upon what dates you're referencing, it may be possible to use our visual theme system to add custom conversion.

@ssddanbrown commented on GitHub (Feb 26, 2023): It may be possible but I didn't see any direct/simple way that aligns with out usage. I wouldn't want to add too much for specific handling of solar dates, since it's had little demand. Depending upon what dates you're referencing, it may be possible to use our [visual theme system](https://github.com/BookStackApp/BookStack/blob/development/dev/docs/visual-theme-system.md) to add custom conversion.
Author
Owner

@MehdiAliPak commented on GitHub (Mar 1, 2023):

hello sir, sorry I have another question how can I change the date picker in bookstack?,
I tried to add some jalali datepicker but when I link the files in the head I get the below error:

Refused to load the script 'http://localhost:8080/dist/jalalidatepicker.js?version=v23.01' because it violates the following Content Security Policy directive: "script-src http: https: 'nonce-4PGmcFET3ePTAZ2NpVWA8vdx' 'strict-dynamic'". Note that 'strict-dynamic' is present, so host-based allowlisting is disabled. Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.

what is the problem and is there anyway to fixt it?

@MehdiAliPak commented on GitHub (Mar 1, 2023): hello sir, sorry I have another question how can I change the date picker in bookstack?, I tried to add some jalali datepicker but when I link the files in the head I get the below error: Refused to load the script 'http://localhost:8080/dist/jalalidatepicker.js?version=v23.01' because it violates the following Content Security Policy directive: "script-src http: https: 'nonce-4PGmcFET3ePTAZ2NpVWA8vdx' 'strict-dynamic'". Note that 'strict-dynamic' is present, so host-based allowlisting is disabled. Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback. what is the problem and is there anyway to fixt it?
Author
Owner

@ssddanbrown commented on GitHub (Mar 1, 2023):

@MehdiAliPak It really depends on how you're adding this. Scripts added to the "Custom HTML Head Content" customization setting get CSP (Content Security Policy) nonce's auto-added, Otherwise you'd have to go to steps to add this CSP nonce manually.

@ssddanbrown commented on GitHub (Mar 1, 2023): @MehdiAliPak It really depends on how you're adding this. Scripts added to the "Custom HTML Head Content" customization setting get CSP (Content Security Policy) nonce's auto-added, Otherwise you'd have to go to steps to add this CSP nonce manually.
Author
Owner

@MehdiAliPak commented on GitHub (Mar 4, 2023):

Hello again, I could change the date picker but the problem is that I can not sort the Audit report, sorting is possible only with the original date picker, now what should I do?? is there any way to fix it??

@MehdiAliPak commented on GitHub (Mar 4, 2023): Hello again, I could change the date picker but the problem is that I can not sort the Audit report, sorting is possible only with the original date picker, now what should I do?? is there any way to fix it??
Author
Owner

@ssddanbrown commented on GitHub (Mar 6, 2023):

Hi @MehdiAliPak,
The default date-picker (Which is a default browser date field) has some added JavaScript logic to submit the parent form when the input is changed. Here's the logic that's used:
db79167469/resources/js/components/submit-on-change.js

@ssddanbrown commented on GitHub (Mar 6, 2023): Hi @MehdiAliPak, The default date-picker (Which is a default browser date field) has some added JavaScript logic to submit the parent form when the input is changed. Here's the logic that's used: https://github.com/BookStackApp/BookStack/blob/db791674691062c26e0073361ab731ed5c772713/resources/js/components/submit-on-change.js
Author
Owner

@ssddanbrown commented on GitHub (Sep 11, 2023):

Since there's been no further discussion here, and no further demand for solar dates, I'll close this off.

@ssddanbrown commented on GitHub (Sep 11, 2023): Since there's been no further discussion here, and no further demand for solar dates, I'll close this off.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#3483