briancwald / material_admin

Drupal 8 Admin Theme
GNU General Public License v2.0
48 stars 15 forks source link

Date fields are overritten #27

Closed e0ipso closed 7 years ago

e0ipso commented 7 years ago

There is a problem when using date fields. Material Admin may be causing data loss at the current state.

See the attached video on how to reproduce. My gut tells me it must be the way the default value is set.

https://monosnap.com/file/RtPuIBss1vhnuRr6gYwpwkakjXJPCz

briancwald commented 7 years ago

I think this is related to the data format not getting read by the date widget to know what format to input it back in. There is the ability to choose your submit value, which I have it manually set to default (which should get set dynamically but that's a separate issue) if it's not holding its value then that's an issue I have not seen, I will review, thanks for the report!

briancwald commented 7 years ago

I think I sovled this here: 7efd2112555bad6b1e3db5d5db671cbb51f66371

I believe the issue was having multiple date fields with the same input class name so it was setting the value for whatever one it reads last, in this case, the "publish date" was getting read and set the value for the field.

briancwald commented 7 years ago

@e0ipso is this ok now? can I close this out?

e0ipso commented 7 years ago

Thanks!