Fixed a bug where the number of days were not being saved to the local state