I've created a Date field with "Ymd" as the value in the "Custom Input Format" under "More Settings and Values" of the Date field. Everything worked well till here, but when I tried adding the date into the desired format which is nothing but "Ymd" which is "20150509", it gave me an error stating that: "The value input for field Date is invalid: The year is invalid."

This should not happen since the I've provided the date in the exact date format which I've defined in the "Custom Input Format" under "More Settings and Values" of the Date field.

Attached are the screenshots for the same.

Comments

Rishi Kulshreshtha created an issue. See original summary.

rishi.kulshreshtha’s picture

Status: Active » Needs review
Issue tags: +API, +date
StatusFileSize
new403 bytes

Attaching patch for the same.

rishi.kulshreshtha’s picture

Assigned: rishi.kulshreshtha » Unassigned

Changing the state to Unassigned

anpolimus’s picture

Assigned: Unassigned » anpolimus

Needs a test in the patch implemented first for this bug.

anpolimus’s picture

Issue tags: +Needs tests
anpolimus’s picture

Status: Needs review » Needs work
rishi.kulshreshtha’s picture

Assigned: anpolimus » Unassigned
Status: Needs work » Closed (fixed)

Hi @anpolimus, I've reviewed and tested this patch and its working fine for me. Hence I'm closing this issue as well.