add constraints to datepicker