chore(js): simplifies elgg.ui.initDatePicker logic
Merge pull request #7255 from mrclay/initDatePicker_logic

chore(js): simplifies elgg.ui.initDatePicker logic