You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Datepicker should accept minDate, maxDate props #2961
Datepicker should accept minDate, maxDate props.
Currently, we can not set minDate, maxDate value in the props.
minDate - The minimum date that the user can select. It will ensure that no earlier date is selected.
maxDate - The maximum date that the user can select. It will ensure that no later date is selected.
The components are meant to follow the SLDS design patterns according to their website it does not offer such functionality so I am not sure how they proceed with extra features.
You can use dateDisabled to achieve that. For example the below will disable dates prior to current day, and additionally disable the current day if it's after 4pm:
<Datepicker{...props}// etcdateDisabled={({ date })=>{constnow=newDate();date.setHours(16,0,0,0);returndate<now;}}/>
This issue has been automatically marked as stale, because it has not had recent activity. It will be closed if no further activity occurs. Maintainers are responsible for tech debt and project health. This is most likely a new components or component feature request. Please submit a pull request for or request feedback on this feature. Thank you.
Activity
abusarah-tech commentedon Sep 5, 2021
The components are meant to follow the SLDS design patterns according to their website it does not offer such functionality so I am not sure how they proceed with extra features.
jcro21 commentedon Jan 18, 2022
You can use
dateDisabledto achieve that. For example the below will disable dates prior to current day, and additionally disable the current day if it's after 4pm:stale commentedon Apr 18, 2022
This issue has been automatically marked as stale, because it has not had recent activity. It will be closed if no further activity occurs. Maintainers are responsible for tech debt and project health. This is most likely a new components or component feature request. Please submit a pull request for or request feedback on this feature. Thank you.