Closed irsama closed 5 years ago
I found an easy solution,
for solve "invalid date" problem for some jalali date like '1398/04/31'. it's enough to replace this line
let date = moment([dateMeta.year, dateMeta.month, dateMeta.day]);
in "selectDate" function with two below line
const jDate = moment(dateMeta.year + '/' + (dateMeta.month + 1) + '/' + dateMeta.day, 'jYYYY/jM/jD').format('YYYY/MM/DD');
let date = moment(jDate, 'YYYY/MM/DD').locale('fa');
Hi, this component is worthy, but when select some dates like '1398/04/31' it displayed 'NaN/NaN/NaN', because it's invalid in gregorian date.