msupply-foundation / open-msupply

Open mSupply represents our most recent advancement in the Logistics Management Information System (LMIS), expanding on more than two decades of development inherited from the well-established legacy of the original mSupply.
https://msupply.foundation/open-msupply/
Other
23 stars 14 forks source link

Prescription date time tab not clickable #4998

Open lache-melvin opened 1 month ago

lache-melvin commented 1 month ago

What went wrong? 😲

https://github.com/user-attachments/assets/b7e0342d-ca8a-4264-a182-dc1a52ede8c0

Expected behaviour 🤔

If I can't enter a time, don't offer me a time tab 🥲

How to Reproduce 🔨

Steps to reproduce the behaviour:

  1. Create prescription
  2. Click date
  3. Try to click time tab in date picker

Your environment 🌱

roxy-dao commented 1 month ago

Prescription (backdate) is date only, so you shouldn't be able to select time 👀 btw Encounter enrolment modal also shows the same "Select date & date" with disabled time selection 😅

mark-prins commented 1 month ago

Changing the DateTimePicker to a BaseDatePickerInput for both the prescription and CreateEncounterModal fixes gives this:

Screenshot 2024-10-10 at 4 48 35 PM

Though what I think would be better is for the DateTimePickerInput to be adjusted. If that used the showTime prop to choose whether to show the DateTimePicker or the DatePicker then this would solve the issue more neatly. and give the mobile date picker view:

image