babakhani / PersianDate

javascript date library for parsing, validating, manipulating, and formatting persian dates System.
http://babakhani.github.io/PersianWebToolkit/doc/persian-date/
Other
559 stars 102 forks source link

Range picker does not change after select one time #135

Closed gholamrezaeipt closed 2 years ago

gholamrezaeipt commented 2 years ago

Expected Behavior

In this example if you choose 24 mordad as start and end date and then you want to change start picker to 25 mordad date the start picker does not change until we change the end picker. for example we have to change end picker to 26 mordad then change the start picker to 25 mordad and again change the end picker to 25 mordad.

(Today is 25 mordad 1401 and i know that i can use today button on picker but this is not the good approach due to we may want select an old date like 10 mordad)

Current Behavior

You can see current behavior in this link

Steps to Reproduce (for bugs)

  1. Just read Expected Behavior Section to Reproduce this bug

Context

we use this library as our date picker and we use a SPA website. for now we have to reload our website every time we want change dates but it's bad! please describe me a good solution.

Your Environment

gholamrezaeipt commented 2 years ago

I solved this issue by comment the line 142 and 270 of above example that limit users to choose older date after select one date. for more information please see that example.