Merge pull request 'refs #5073 adaptacion para solo el año' (!1397) from 5073-diaActual into dev
gitea/salix/pipeline/head There was a failure building this commit Details

Reviewed-on: #1397
Reviewed-by: Joan Sanchez <joan@verdnatura.es>
This commit is contained in:
Joan Sanchez 2023-03-21 10:21:59 +00:00
commit 82a674e2f6
1 changed files with 3 additions and 1 deletions

View File

@ -114,12 +114,14 @@ export default class Calendar extends FormInput {
let day = date.getDate();
let wday = date.getDay();
let month = date.getMonth();
let year = date.getFullYear();
const currentDay = Date.vnNew().getDate();
const currentMonth = Date.vnNew().getMonth();
const currentYear = Date.vnNew().getFullYear();
let classes = {
today: day === currentDay && month === currentMonth,
today: day === currentDay && month === currentMonth && year === currentYear,
weekend: wday === 6 || wday === 0,
previous: month < this.month,
current: month == this.month,