Skip to content

Commit

Permalink
Update packages/reports/src/Components/Form/CompositeCalendar/two-mon…
Browse files Browse the repository at this point in the history
…th-picker.tsx

Co-authored-by: Niloofar Sadeghi <93518187+niloofar-deriv@users.noreply.github.com>
  • Loading branch information
sergei-deriv and niloofar-deriv authored Jan 11, 2023
1 parent 3f7607e commit f3ed5e2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const TwoMonthPicker = React.memo(({ onChange, isPeriodDisabled, value }: TTwoMo
* @param {Extract<moment.DurationInputArg2, 'month'>} range
* @returns {boolean}
*/
const validateToArrows = (date: moment.Moment, range: Extract<moment.DurationInputArg2, 'month'>): boolean => {
const validateToArrows = (date: moment.Moment, range: Extract<moment.DurationInputArg2, 'month'>) => {
// if (range === 'year') return true; // disallow year arrows
const r_date = epochToMoment(right_pane_date).startOf('month');
if (diffInMonths(toMoment().startOf('month'), r_date) === 0) return true; // future months are disallowed
Expand Down

0 comments on commit f3ed5e2

Please sign in to comment.