any special reason why you use an id selector (#)?
There is a chance that this element will repeats itself in other modals and as such, it is not unique, better use a class selector (".datepicker-container")