Fixed JS error, when date_picker is not activated