Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Datepicker/lib/RangePicker.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Datepicker/lib/main.js.map

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions Datepicker/src/DayComponent/DayComponent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,12 @@ const DayComponent = ({

const [year, month] = monthId.split("__").map((el) => Number(el));

const todayDate = new Date().toLocaleString().replace(/(\d+)\/(\d+)\/(\d+)/, '$3-$1-$2');
const today = isJalaali
? jMoment(new Date().toISOString(), GEORGIAN_DATE_FORMAT).format(
JALAALI_DATE_FORMAT
? jMoment(todayDate, GEORGIAN_DATE_FORMAT).format(
JALAALI_DATE_FORMAT
)
: new Date().toISOString();
: todayDate;

const currentDate = `${year}-${month}-${day}`;

Expand Down
7 changes: 4 additions & 3 deletions src/js/Components/Datepicker/DayComponent/DayComponent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,12 @@ const DayComponent = ({

const [year, month] = monthId.split("__").map((el) => Number(el));

const todayDate = new Date().toLocaleString().replace(/(\d+)\/(\d+)\/(\d+)/, '$3-$1-$2');
const today = isJalaali
? jMoment(new Date().toISOString(), GEORGIAN_DATE_FORMAT).format(
JALAALI_DATE_FORMAT
? jMoment(todayDate, GEORGIAN_DATE_FORMAT).format(
JALAALI_DATE_FORMAT
)
: new Date().toISOString();
: todayDate;

const currentDate = `${year}-${month}-${day}`;

Expand Down