Gitea version (or commit ref): 5fc0a12
Can you reproduce the bug at https://try.gitea.io:
I guess the following image would explain the issue better.
On which page do you currently experience this issue?
It is on issue page
We already have multiple issues regarding this, should we use some library to handle date formatting?
But I saw the response of "https://try.gitea.io/api/v1/repos/{userName}/{repoName}/issues/1/deadline" in the chrome console is 401
And the request payload is {due_date: "2017-02-17T00:00:00.000Z"}
This issue seems not caused by error formating
@kanocz anything in the logs?
I only have the browser console log.

Actually, I have some trouble to run gitea on my local.
@kanocz What was the response?
Also, if you have problems running Gitea locally, feel free to ask in our Discord server or the forum.
I got this on my local environment.
The response was 401. Since the client ajax call got the 401 error, the js function setDeadline() handle the error in the same way. So it shows the "The due date is invalid or out of range. Please use the format 'yyyy-mm-dd' " on the page.
This also happens in the Swagger dashboard for the same request.
Looks like this was broken by #4840 (among other things)
@kolaente Yes, I trace the code and make some experiments. I found that
ctx.Data["IsApiToken"] = true
does not be executed while checking user is signed.
So
func reqToken() macaron.Handler {
return func(ctx *context.Context) {
for key := range ctx.Data{
fmt.Printf("Key: %s |Value: %v\n", key, ctx.Data[key])
}
if true != ctx.Data["IsApiToken"] {
ctx.Error(401)
return
}
}
}
always gets 401 error.
I've opened #5249 to fix this and other issues.
It looks like it returns an error 500, so maybe some other thing is broken and the error message is just not good...
Yep, it send a payload:

and receive nothing

@nikitasius could you confirm that #5250 didn't resolve the issue?
@nikitasius could you confirm that #5250 didn't resolve the issue?
Hi, it was on your official demo. If you don't see on your official demo same error - guess it's fixed. Just check.