Desired User Flow:
Initial Display:
When the user navigates to the
edit_profile
page:There is a DOB widget that displays the user's date of birth (DOB) if it is already stored in the database.
If the DOB is not yet set in the database, the widget will show "Set your Birthday" text
Interacting with the Date Picker:
When the user clicks on the DOB widget:
A Date Picker is displayed, allowing the user to select a new date.
If the user selects a date and confirms it, the newly chosen date immediately replaces the current value in the DOB widget.
The user can then click a "Save" button on the
edit_profile
page to update their DOB in the database with the newly selected date.
Handling Cancellation or Clicking Out:
If the user opens the Date Picker but decides not to select a date:
The user can either press cancel Date Picker or click outside the Date Picker to close it.
In such cases, the DOB widget should revert to displaying the user's current DOB from the database.