New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BcFormHelper->dateTimePicker 一度選択するまで日時の書式が正しくない #1930
Labels
Bug
バグ
Comments
ブログの場合、FrozenTimeへの変換処理を消すと以下の型チェックでバリデーションエラーになる
ただ、このルールそのものがcake標準のdatetimeルールと重複している可能性はあり
|
ryuring
pushed a commit
that referenced
this issue
Apr 17, 2023
seto1
added a commit
to seto1/basercms
that referenced
this issue
May 17, 2023
gondoh
added a commit
that referenced
this issue
May 18, 2023
fix #1930 FrozenTime::setToStringFormat 書式変更
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
問題
画面を開いた初期状態では、dateTimePickerのhiddenの日時の書式が「Y/m/d H:i:s」になっている。
そのまま保存ボタンを押下し、リクエストをDBに保存した場合、日時がnullで保存されてしまう。
これを避けるには、以下のブログの例のように変換処理を毎回行う必要がある。
https://github.com/baserproject/ucmitz/blob/dev/plugins/bc-blog/src/Service/BlogPostsService.php#L507
一度選択すると書式が正しくなるのは、以下でJavaScriptによる変換処理を入れているためだと思われる。
https://github.com/baserproject/ucmitz/blob/dev/plugins/baser-core/src/View/Helper/BcFormHelper.php#L315
改善案
https://github.com/baserproject/ucmitz/blob/dev/plugins/baser-core/src/View/Helper/BcFormHelper.php#L258
このあたりに、以下のような書式変更処理を入れる
The text was updated successfully, but these errors were encountered: