inovua / reactdatagrid

Empower Your Data with the best React Data Grid there is
https://reactdatagrid.io
Other
3.45k stars 57 forks source link

Optional Date Filter Week Number Column #325

Open collinstrait opened 1 year ago

collinstrait commented 1 year ago

Optional Week Number Column in Date Calendar

Problem Statement

There is a week number column in each of the date filtering calendars. It would be nice to have this as an optional feature. This week number might be confusing to a user seeing it for the first time.

alt text

As can be seen in the documentation, there is no prop in filterEditorProps that allows for the week number column to be removed.

filterEditorProps: (props, { index }) => {   // for range and notinrange operators, the index is 1 for the after field  return {   dateFormat: 'MM-DD-YYYY',   cancelButton: false,   highlightWeekends: false,   placeholder: index == 1 ? 'Created date is before...': 'Created date is after...'  } },

Documentation

Proposed Change:

Create new boolean prop in filterEditorProps (i.e. displayWeekNumColumn). When true, the week number column is shown, and when false, it is not.

Eric2048 commented 3 months ago

Yes! Really need this to be optional -- thanks. Until a solution is provided, here is a quick CSS workaround:

.inovua-react-toolkit-calendar__month-view-week-number {
    display: none;
  }