lazy-bee / components

23 stars 10 forks source link

selectDateString is not reacting to initial set of start / end date #52

Open the-hip-group opened 4 years ago

the-hip-group commented 4 years ago

Details I am using the DateTimePicker as below

<DateTimePicker ref="datePicker" :start-date="startDate" :end-date="endDate" default false @onChange="onDateChange" />

In my mounted lifecycle event, I set both the start and end date to valid javascript dates.

Observed The selectDateString is using the current date as apposed to the start and end date that were set via the props. When opening the actual modal, the dates are correctly set. It looks to be a reactivity issue.

Expected selectDateString to accurately show the date that has been set via props.

wahengchang commented 4 years ago

hi, @the-hip-group , i can not reproduce your problem, i added these unit test to prevent the situration as u mentioned.

https://github.com/lazy-bee/components/pull/54