-1

I want to remove "00" from time in react-big-calendar but not able to find the way.enter image description here

Chandrapratap
  • 82
  • 1
  • 1
  • 9
  • Welcome to Stack Overflow. Please see, [What should I do when someone answers my question?](https://stackoverflow.com/help/someone-answers) Also go through the [tour] so that you will be familiar with how to use this platform. – Praveen Kumar Purushothaman Jan 07 '21 at 17:21

1 Answers1

1

If you had looked into Localization and Date Formatting in the Readme / Manual, you could have easily done it using the following. TBH, it's right there in the Getting Started - you need to use dateFormat:

import BigCalendar from 'react-big-calendar'
import moment from 'moment'

// Setup the localizer by providing the moment (or globalize) Object
// to the correct localizer.
const localizer = BigCalendar.momentLocalizer(moment) // or globalizeLocalizer

const MyCalendar = props => (
  <div>
    <BigCalendar
      localizer={localizer}
      events={myEventsList}
      startAccessor="start"
      endAccessor="end"
      dateFormat="h t"
    />
  </div>
)

Preview

demo

Related: How to set momentLocalizer (moment.js) for react-big-calendar (fullcalendar.js)?

Praveen Kumar Purushothaman
  • 164,888
  • 24
  • 203
  • 252