Skip to content

Commit

Permalink
feature #13163 [UX][Attribute] Use single_text widget for Date&DateTi…
Browse files Browse the repository at this point in the history
…me attribute form type (Jibbarth)

This PR was merged into the 1.12 branch.

Discussion
----------

| Q               | A
| --------------- | -----
| Branch?         | master <!-- see the comment below -->
| Bug fix?        | no
| New feature?    | yes
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | N/A
| License         | MIT

Hi 👋 

I notice that Date and DateTime attribute use the default render on Product attribute tabs:

![image](https://user-images.githubusercontent.com/3168281/135748246-9c4577fd-5b8f-4604-a729-67498a580612.png)

This PR change this to use the great  rendering, combined with : 

![image](https://user-images.githubusercontent.com/3168281/135748309-c67d66ea-9ca1-4469-89d8-f3e710dad88c.png)

I think it would provide a better User Experience to have unified display for date/datetime in the Admin.

I targetted  branch cause it could be considered as a new feature, but I can change to  if needed.

WDYT ?  


Commits
-------

93018e1 [UX][Attribute] Use single_text widget for Date and DateTime attribute Form type
  • Loading branch information
lchrusciel committed Jul 19, 2022
2 parents 129b520 + 93018e1 commit 4b0ebb9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public function configureOptions(OptionsResolver $resolver): void
$resolver
->setDefaults([
'label' => false,
'widget' => 'single_text',
])
->setRequired('configuration')
->setDefined('locale_code')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ public function configureOptions(OptionsResolver $resolver): void
$resolver
->setDefaults([
'label' => false,
'date_widget' => 'single_text',
'time_widget' => 'single_text',
])
->setRequired('configuration')
->setDefined('locale_code')
Expand Down

0 comments on commit 4b0ebb9

Please sign in to comment.