Dear
Is that possible run DatePicker with value={null} because i don't wanna select date by default
BR,
@soroushm yes, it's possible.
@cherniavskii ok how working ?
with value={null} i will get a error
bundle.js:156606 Uncaught Error: Invalid Jalaali year -100721
at jalCal (bundle.js:156606)
at d2j (bundle.js:156670)
at Object.toJalaali (bundle.js:156538)
at toJalaali (bundle.js:140024)
at F.jMoment.fn.jYear (bundle.js:139763)
at F.jYYYY (bundle.js:139230)
at Object.jYYYY/jMM/jDD (bundle.js:139415)
at F.jMoment.fn.format (bundle.js:139746)
at labelFunc (bundle.js:135337)
at DateTextField._this.getDisplayDate (bundle.js:157032)
<DatePicker
okLabel={t('Ok')}
cancelLabel={t('Cancel')}
labelFunc={date => (jMoment(date).format('jYYYY/jMM/jDD'))}
value={null}
leftArrowIcon={<KeyboardArrowLeft />}
rightArrowIcon={<KeyboardArrowRight />}
disablePast
fullWidth
autoOk
animateYearScrolling
onChange={this.handleDateChange}
shouldDisableDate={this.shouldDisableDate}
utils={jalaliUtils}
/>
Version
[email protected]
material-ui-pickers-jalali-utils@^0.2.0
and without value attr by default selected today
@dmtrKovalenko any Update ?
@soroushm if you are experiencing a bug - please submit an issue with detailed description. It's hard to help you without details.
@cherniavskii ok what do you want ?
i'm using date picker and i need empty date picker when component did mount
actually by default selected today
Ideally - live example reproducing the issue (e.g. on Codesandbox)
Most helpful comment
@cherniavskii ok what do you want ?
i'm using date picker and i need empty date picker when component did mount
actually by default selected today