Why the date picker option doesn't work in my form?