im using week calendar and by default its show current week.
for example today for 2021-02-01
its render from '2021-02-01' to '2021-02-07'
when i press "Next" button (step 1*), its render next week from '2021-02-08' to '2021-02-15'
and sets param first day of week: start_date=2021-02-08
ok, sounds good.
in my model i take weekly entities with something like this:
MyModel.where(created_at: Date.parse(start_date)...(Date.parse(start_date) + 7.days)
but
when i press "Previous" (step 2*) its render correct week from '2021-02-01' to '2021-02-07',
but now sets in params last day of this week: start_date=2021-02-07
when i really expect: start_date=2021-02-01
and now my model returns wrong data.
not sure its a bug, maybe i do wrong?
*steps how to reproduce this
i also checked month calendar - got same behavor
hello.
im using week calendar and by default its show current week. for example today for 2021-02-01 its render from '2021-02-01' to '2021-02-07'
when i press "Next" button (step 1*), its render next week from '2021-02-08' to '2021-02-15' and sets param first day of week: start_date=2021-02-08 ok, sounds good.
in my model i take weekly entities with something like this:
MyModel.where(created_at: Date.parse(start_date)...(Date.parse(start_date) + 7.days)
but when i press "Previous" (step 2*) its render correct week from '2021-02-01' to '2021-02-07', but now sets in params last day of this week: start_date=2021-02-07 when i really expect: start_date=2021-02-01 and now my model returns wrong data.
not sure its a bug, maybe i do wrong?
*steps how to reproduce this i also checked month calendar - got same behavor