Skip to content

Commit

Permalink
Enable the current date for selection in planform
Browse files Browse the repository at this point in the history
  • Loading branch information
peterMuriuki committed Nov 15, 2023
1 parent e1b65d3 commit a5a9c61
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/plan-form/src/Form/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,10 @@ export interface PlanFormProps extends CommonProps {
* Denotes what range of dates can be picked. I.e. only dates in the future
*
* @param {dayjs.Dayjs} current - current selected/hovered date (date picker)
* @returns {boolean} - returns true if disabled and viseversa
* @returns {boolean} - returns true if disabled and vice versa
*/
export const disableDate = (current: dayjs.Dayjs) => {
return current && current < dayjs().endOf('day');
return current && current < dayjs().startOf('day');
};

/**
Expand Down

0 comments on commit a5a9c61

Please sign in to comment.