Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

legacy octal literals are not allowed in strict mode when setting time to midnight #2776

Open
Sed9yDataBank opened this issue Aug 25, 2022 · 0 comments

Comments

@Sed9yDataBank
Copy link

My Environment

  • flatpickr version used: "flatpickr": "^4.6.9"

I am using flatpickr with Vue.js and I am trying to force setting the time to midnight by doing this

setMidnight(flatpickrObject) {
        flatpickrObject.hourElement.value = 12
        flatpickrObject.minuteElement.value = 00
        flatpickrObject.secondElement.value = 00
        flatpickrObject.amPM.textContent = 'AM'
    }

but I get this error legacy octal literals are not allowed in strict mode

setMidnight(flatpickrObject) {
        flatpickrObject.hourElement.value = 11
        flatpickrObject.minuteElement.value = 59
        flatpickrObject.secondElement.value = 59
        flatpickrObject.amPM.textContent = 'PM'
    }

the above works fine, it seems like there is a problem with the 00 and I cannot figure out a workaround for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant