Adding custom directive to init and manage datepicker.