Task #27: save model to DB

Fixed small bug with the datepicker.