Fluentui: What is the correct way to use it calendarProps ?

Created on 26 Sep 2018  ·  2Comments  ·  Source: microsoft/fluentui

<DatePicker label={this.props.label}
                placeholder={"Selecione uma data"}
                value={new Date(date)}
                showMonthPickerAsOverlay={true}
                showWeekNumbers={false}
                onSelectDate={this.onSelectDate}
                calendarProps={{ isDayPickerVisible: false, isMonthPickerVisible: true }}
                formatDate={date => new Intl.DateTimeFormat('pt-BR').format(date)} 
                strings={DayPickerStrings} />)

is not rendering as expected

Question ❔

All 2 comments

@alexgwolff I'm rendering your calendarProps in this Codepen: https://codepen.io/kevintcoughlin/pen/vzwVyz?editors=1010

Which seems to render correctly (only the month picker is shown):

image

However when I use showMonthPickerAsOverlay={true} the day picker seems to be rendered. Perhaps that prop is taking precedence. That might be a bug.

Mind sharing your desired render output? Do you only want the month picker visible?

Yes, only month.
I try removed showMonthPickerAsOverlay={true} and now this is working.
it's a bug?
For now I'll leave this property out

Thanks, bro

Was this page helpful?
0 / 5 - 0 ratings