Skip to content

Conversation

@Cosmin-Madalin
Copy link

Fixing: #735

This change does not introduce new behaviour or functionality but simply corrects the TypeScript definition to align with existing behaviour.

Previously, the onHide prop's TypeScript definition accepted a single Date parameter, representing the selected date when the modal is dismissed. However, the actual implementation passes two parameters: a boolean indicating whether the Confirm button was pressed, and a Date object if the Confirm button was pressed. The updated TypeScript definition now accurately reflects this functionality.

Test Plan

Confirm Button Press:

  • Open the date-time picker.
  • Select a date and press the Confirm button.
  • Ensure that onHide is called with didPressConfirm set to true and currentDate reflecting the selected date.

Cancel Button Press:

  • Open the date-time picker.
  • Press the Cancel button without selecting a date.
  • Ensure that onHide is called with didPressConfirm set to false, and currentDate is undefined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants