datefield directive fix bug