mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
4c3e2c252a
* chore: due date filter * fix: deployment error * chore: optimized code * chore: created constants for due date * chore: create seperated css file for react datepicker styling * fix: due date filter * chore: highlight selected option * fix: merge conflicts * fix: build error * chore: date range selector validation * fix: issue views overflow * refactor: due date filter modal code * refactor: multi level dropdown * chore: due date filter select default value --------- Co-authored-by: Aaryan Khandelwal <aaryankhandu123@gmail.com>
38 lines
983 B
TypeScript
38 lines
983 B
TypeScript
// helper
|
|
import { renderDateFormat } from "helpers/date-time.helper";
|
|
|
|
export const DUE_DATES = [
|
|
{
|
|
name: "Last week",
|
|
value: [
|
|
`${renderDateFormat(new Date(new Date().getTime() - 7 * 24 * 60 * 60 * 1000))};after`,
|
|
`${renderDateFormat(new Date())};before`,
|
|
],
|
|
},
|
|
{
|
|
name: "2 weeks from now",
|
|
value: [
|
|
`${renderDateFormat(new Date())};after`,
|
|
`${renderDateFormat(new Date(new Date().getTime() + 14 * 24 * 60 * 60 * 1000))};before`,
|
|
],
|
|
},
|
|
{
|
|
name: "1 month from now",
|
|
value: [
|
|
`${renderDateFormat(new Date())};after`,
|
|
`${renderDateFormat(
|
|
new Date(new Date().getFullYear(), new Date().getMonth() + 1, new Date().getDate())
|
|
)};before`,
|
|
],
|
|
},
|
|
{
|
|
name: "2 months from now",
|
|
value: [
|
|
`${renderDateFormat(new Date())};after`,
|
|
`${renderDateFormat(
|
|
new Date(new Date().getFullYear(), new Date().getMonth() + 2, new Date().getDate())
|
|
)};before`,
|
|
],
|
|
},
|
|
];
|