Jump to content

Javascript Date Bug


fengche134@hotmail.com
 Share

Recommended Posts

fengche134@hotmail.com

Hello,

I am using Nitro Pro ver 10.0.0.24.

I have a form field named "Date" with the following date: 04/21/2020

I have the following code:

var formDate = this.getfield("Date").value

startDate = util.scand("mm/dd/yyyy", formDate)

app.alert(startDate, 1)

The date that shows up in the message box is May 21 2020.

If I change the date in the form field to 03/21/2020 then the date that shows up the message box is March 21 2020. It appears this bug only shows up in certain months.

Is there a fix to this?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.