date working except for modal