modal working with date