updating datepicker to use moment's native methods instead of accessing object directly