D
D
dataWave2020-02-12 19:34:46
JavaScript
dataWave, 2020-02-12 19:34:46

How to adjust the calendar to the desired format?

There is a ready-made calendar solution: https://codesandbox.io/s/sparkling-framework-ugnd9...
It is necessary to correct this solution so that the output format is: " Mon , Tue, Wed, Thu, Fri, Sat, Sun".
At the moment it looks a little different "Sun, Mon , Tue, Wed, Thu, Fri, Sat".
The calendar is called by clicking on the input.
PS Just change the row with hardcore short names of days - it doesn’t work, you need the functionality to change the month and year to work correctly))

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Klein Maximus, 2020-02-12
@dataWave

Line 108:

let firstMonthDay = new Date(year, month).getDay();
let firstDay = firstMonthDay > 0 ? firstMonthDay - 1 : 6;

Well, in 259, specify the desired sequence:
["ПН", "ВТ", "СР", "ЧТ", "ПТ", "СБ", "ВС"]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question