react-timeline-gantt
react-timeline-gantt copied to clipboard
supporting jalali-date
I'm trying to use gantt chart with Jalali calendar with moment-jalali.
I've changed getFormat
and so far it's ok, except Jalali year month starts in March so I had to change getStartDate
function.
getStartDate = (date, mode) => {
let year = null;
switch (mode) {
case 'year':
return date.startOf('jYear');
case 'month':
return date.startOf('jMonth');
case 'week':
return date.subtract(date.day(), 'days');
default:
return date
}
}
but now I'm getting bugs in the calender... on scrolling chart month and year not showing and disappears... is there any other function I should change?
Can you share the code in codesandbox?
On Wed, May 29, 2019 at 7:21 PM RZsam [email protected] wrote:
I'm trying to use gantt chart with Jalali calendar with moment-jalali https://github.com/jalaali/moment-jalaali. I've changed getFormat and so far it's ok, except Jalali year month starts in March so I had to change getStartDate function.
getStartDate = (date, mode) => { let year = null; switch (mode) { case 'year': return date.startOf('jYear'); case 'month': return date.startOf('jMonth'); case 'week': return date.subtract(date.day(), 'days'); default: return date } }
but now I'm getting bugs in the calender... on scrolling chart month and year not showing and disappears... is there any other function I should change?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/guiqui/react-timeline-gantt/issues/26?email_source=notifications&email_token=ADMV2DVI2ZDCGMQRZLOSPULPXYVHBA5CNFSM4HQJZOF2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GWM6KAQ, or mute the thread https://github.com/notifications/unsubscribe-auth/ADMV2DT3AENJSIGBEB2ICPDPXYVHBANCNFSM4HQJZOFQ .
@guiqui I forked your sandbox yesterday but it seems like sandbox dependencies only are added from npm and couldn't find a way to use my git fork as a dependency .I've added my fork url in package.json but it gives error. sorry but I hope it helps sandbox