Closed MehdiAliPak closed 12 months ago
Hi @MehdiAliPak, Sorry for my late response, had to check this myself.
It does not seem possible to use solar dates within BookStack.
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?
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.
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 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.
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??
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
Since there's been no further discussion here, and no further demand for solar dates, I'll close this off.
Attempted Debugging
Searched GitHub Issues
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