mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-23 17:14:24 +00:00
fix milestone format parse
This commit is contained in:
parent
44c32a8a53
commit
77dcef0cab
|
@ -406,7 +406,7 @@ milestones.title = Title
|
|||
milestones.desc = Description
|
||||
milestones.due_date = Due Date (optional)
|
||||
milestones.clear = Clear
|
||||
milestones.invalid_due_date_format = Due date format is invalid, must be 'mm/dd/year'.
|
||||
milestones.invalid_due_date_format = Due date format is invalid, must be 'year-mm-dd'.
|
||||
milestones.create_success = Milestone '%s' has been created successfully!
|
||||
milestones.edit = Edit Milestone
|
||||
milestones.edit_subheader = Use better description for milestones so people won't be confused.
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1033,9 +1033,9 @@ func NewMilestonePost(ctx *middleware.Context, form auth.CreateMilestoneForm) {
|
|||
}
|
||||
|
||||
if len(form.Deadline) == 0 {
|
||||
form.Deadline = "12/31/9999"
|
||||
form.Deadline = "9999-12-31"
|
||||
}
|
||||
deadline, err := time.Parse("01/02/2006", form.Deadline)
|
||||
deadline, err := time.Parse("2006-01-02", form.Deadline)
|
||||
if err != nil {
|
||||
ctx.Data["Err_Deadline"] = true
|
||||
ctx.RenderWithErr(ctx.Tr("repo.milestones.invalid_due_date_format"), MILESTONE_NEW, &form)
|
||||
|
|
Loading…
Reference in a new issue