kirbydesign / designsystem

Kirby Design System
https://cookbook.kirby.design
MIT License
84 stars 22 forks source link

[Enhancement] Modify date component to contain calendar icon #3234

Closed NillerW closed 7 months ago

NillerW commented 1 year ago

Describe the enhancement

The Kirby input-field of type date should support an icon.

This will enable the to-be-implemented functionality of selecting date by clicking on the icon.

Describe the solution you'd like

The input-field should allow an icon inside the date input.

Tasks (refinement 6/12 2023)

Are there any additional context?

This is to enable the creation of a date range component.

Checklist:

The following tasks should be carried out in sequence in order to follow the process of contributing correctly.

Refinement

Implementation

The contributor who wants to implement this issue should:

Review

Once the issue has been implemented and is ready for review:


(fix the date mask issue for dateInput - not allowing affix)

jkaltoft commented 9 months ago

Just-before-Christmas status

Screenshots and screen recordings

Firefox Nightly v122

https://github.com/kirbydesign/designsystem/assets/150451/f4fed1dc-9b0f-4987-ad7e-814ddddbd8b3

Firefox Nightly v122

Firefox v120

https://github.com/kirbydesign/designsystem/assets/150451/0a0593b1-290f-409f-a513-1e318eb18076

Firefox v120 1

Firefox v120 2

Firefox v120

Google Chrome Canary v122

https://github.com/kirbydesign/designsystem/assets/150451/146b1f20-7385-43da-a9ec-b74041240291

Google Chrome Canary v122

Google Chrome v120

https://github.com/kirbydesign/designsystem/assets/150451/315fa526-5179-482d-92f2-ab1c920e6ec2

Google Chrome v120

Microsoft Edge Dev v121

Language set to danish on OS level

https://github.com/kirbydesign/designsystem/assets/150451/95af7205-c328-45a1-9f02-d10d717b142b

Microsoft Edge Dev v121

Safari iOS 17.0 iPhone 15 Pro (Simulator)

https://github.com/kirbydesign/designsystem/assets/150451/45234fb8-4fff-4189-b9a0-714e25e490a9

![iOS 17 0 iPhone 15 Pro 1](https://github.com/kirbydesign/designsystem/assets/150451/0348fd71-10a6-4a4a-8373-fb9d9cf2fe78) ![iOS 17 0 iPhone 15 Pro 2](https://github.com/kirbydesign/designsystem/assets/150451/dcf98d41-976d-4b58-ab1d-841c41de1acd) ![iOS 17 0 iPhone 15 Pro 3](https://github.com/kirbydesign/designsystem/assets/150451/29067f13-9edf-473e-be90-803829160a05)

Safari Technology Preview v17.4

https://github.com/kirbydesign/designsystem/assets/150451/28dd1047-e41c-48a5-8c7b-36a6bea640d9

Safari Technology Preview v17 4

Safari v17.1.2

https://github.com/kirbydesign/designsystem/assets/150451/21b8ee65-6355-4d8d-afd1-3e185e6ef3bb

Safari v17 1 2

jkaltoft commented 8 months ago

@jakobe @NillerW

Regarding the requirement "It should be possible to change the default icon".

What is the use case for changing the icon for the date picker to something other than the calendar icon? I talked to @RasmusKjeldgaard and @henrikvoetmand about this and we couldn't figure out why this should be possible.

I may be missing some context. Can you elaborate on this?

NillerW commented 8 months ago

I don't recall if there was a specific use-case - I believe there wasn't and currently isn't.

It was more to have the freedom to change it, should the need arise. I am all for, "then let's use the same icon everywhere", but that's hardly ever the case.

I could see scenarios where a calendar icon could be filled with another icon, like birth, death, payday etc. simply for user experience.

It's up to @henrikvoetmand

Obviously it could be added later, but might be way easier and cheaper to just do it now while you're at it.