inovex / elements

Lovingly crafted ui components based on web components. Works well with all Frameworks - including Angular, React and Vue.
https://elements.inovex.de
MIT License
69 stars 9 forks source link

ino-datepicker: ino-default-date is not working. #340

Closed Sl1nd closed 3 years ago

Sl1nd commented 3 years ago

Describe the bug

Currently the ino-default-date is not working. The default date is always set to current date.

To Reproduce

Steps to reproduce the behavior:

  1. Go to https://elements.inovex.de/dist/latest/storybook/?path=/story/input-ino-datepicker--default-usage
  2. Change ino-default-date in "Date Config" Tab

Your Environment

Software Version
@inovex.de/elements v2.3.0
Browser Chrome
Operating System MacOS

Possible Solution

ino-default-date property is not used to configure flatpicker

Sl1nd commented 3 years ago

Not fixed for all types. e.g. datetime, month

janivo commented 3 years ago

We need to think about weather the defaultDate, defaultMinute and defaultHour props still make sense as our datepicker is now uncontrolled.

I would suggest:

janivo commented 3 years ago

I decided to keep the default props (ino-default-date, ino-default-hour, ...) because there might be some cases where it's useful e.g.: If you want to "suggest" a date to the user without actually pre-selecting a value.