hoangnm / react-native-week-view

Week View Component for react-native
MIT License
306 stars 97 forks source link

BUG: Cant Costumize width timetable #345

Open sushitrash06 opened 4 months ago

sushitrash06 commented 4 months ago

Bug description: I'm unable to customize the width of the columns in the timetable. When I try to display a week view, only 6 days are shown because the last day is getting cut off.

Visual demo: Screenshots, videos or gifs to help explain your problem

Code to reproduce

<WeekView
          windowSize={21}
          initialNumToRender={50}
          timesColumnWidth={40}
          hoursInDisplay={20}
          events={events}
          onGridClick={createSomeNewEvent}
          fixedHorizontally={true}
          showTitle={false}
          numberOfDays={7}
          formatDateHeader="ddd"
          formatTimeLabel="HH"
          pageStartAt={{weekday: 0, left: 1}} // Start from Monday (weekday: 1)
          selectedDate={new Date()}
          onEventPress={handlePressEvent}
          onDragEvent={(event, newStartDate, newEndDate) =>
            updateEvent(event, newStartDate, newEndDate)
          }
          editingEvent={editingEventId}
          editEventConfig={EDIT_EVENT_CONFIG}
          headerStyle={{borderColor: 'transparent'}}
          headerTextStyle={{color: 'white', fontSize: 11}}
          hourTextStyle={styles.hourText}
          gridColumnStyle={{
            borderColor: '#383838',
          }}
          gridRowStyle={{
            borderColor: '#383838',
          }}
        />

Environment:

Important: using your own fork makes this more difficult to reproduce and solve. We recommend trying with the latest week-view version.

Additional context (optional):

pdpino commented 4 months ago

The width cannot be configured at the moment

sushitrash06 commented 4 months ago

The width cannot be configured at the moment

can i set end date to show, example i just want to showing 03 - june 2024 until 09 - june - 2024 ?