Tradeshift / tradeshift-ui

Tradeshift UI is a framework-agnostic JavaScript library to help Tradeshift App developers to create cohesive user experiences and to provide reusable UI components.
https://ui.tradeshift.com
Other
33 stars 44 forks source link

Datepicker component does not disable the dates before the current one #456

Closed mad-shift closed 6 years ago

mad-shift commented 6 years ago

Bug report

Tradeshift UI version affected

v9.3.4.

Expected Behavior

Datepicker component should disable the dates before the current one when selecting a delivery date on an item card in Basket app

Actual Behavior

Datepicker component does not disable the dates before the current one when selecting a delivery date on an item card in Basket app - if the date was previously set to a year behind

Steps to reproduce

  1. Add an item to basket that has delivery date one year behind (for example 2016)
  2. Select that item and open datepicker component

Screenshots (optional)

screenshot from 2017-11-24 10-24-33 This is what happens when the year is 2012 for example screenshot from 2017-11-23 18-03-13 This is for the current year (expected behavior) screenshot from 2017-11-24 16-37-02


Feature request

Description of feature

Example use cases and/or Prototype links

Designs and/or Prototype screenshots

wiredearp commented 6 years ago

The min attribute must be specified using the same YYYY-MM-DD format as the value and that is not the case in your screenshot. Does it help if you try that?

mad-shift commented 6 years ago

This issue has been fixed on our side. The min attribute now checks fine but the problem remains since the value is the one considered. If the value is in the past the dates are not disabled. datevaluenottakenintoaccount

wiredearp commented 6 years ago

:see_no_evil: