Closed JonasKellerer closed 2 weeks ago
Maybe we can instead supply constants that make it easy to plug the now predefined date ranges into the component?
export type CustomSelectOption<CustomLabel extends string> = { label: CustomLabel; dateFrom: string; dateTo: string };
export const LAST_6_MONTHS = { label: "last6Months"; dateFrom: today().minus("6 months"); dateTo: today() };
export const LAST_MONTH = ...;
Sounds like a good idea.
When using
gs-date-range-selector
, it becomes apparent, that the predefined date range options are hindering. One needs to write custom logic in two places. I would suggest removing the predefined options and only have "Custom" left. This way the user has more agency over the component.