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

Auto Due Date Timestamp. #102

Closed
whitebook opened this issue Apr 29, 2014 · 3 comments
Closed

Auto Due Date Timestamp. #102

whitebook opened this issue Apr 29, 2014 · 3 comments

Comments

@whitebook
Copy link

I hope to describe the issue accurately.

I noticed an issue with the javascript auto payment terms due_date timestamp format.

When the invoice is first generated based on the default payment terms of the customer

The start date is always right, but the due date gets a full UTC timestamp

This is the timestamp auto-generated.
"due_date":"2014-05-13T04:00:00.000Z"

However if you try to save this timestamp you will get an error because we expect the format to be 'Apr 29, 2014'

If you manually select a due date the time stamp changes to the correct format.
"due_date":"May 15, 2014"

I personally think that the date handling should be done client side maybe using moment.js and I think the json object should pass back to the server full UTC stamps.

(But perhaps you have had issues with that approach that is maybe why you chose to do it server side.)

@hillelcoren
Copy link
Member

Thanks for reporting this issue.

I'm able to replicate the problem, I'm working on it now...

@hillelcoren
Copy link
Member

I've checked in a fix for this and deployed it to production. I've used the datepicker to handle formatting the date. Long term I'm going to look into using moment.js (most date work is currently handled server side).

@whitebook
Copy link
Author

Awesome I will pull now.

On 4/29/14 9:49 AM, Hillel Coren wrote:

I've checked in a fix for this and deployed it to production. I've
used the datepicker to handle formatting the date. Long term I'm going
to look into using moment.js (most date work is currently handled
server side).


Reply to this email directly or view it on GitHub
#102 (comment).

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

2 participants