setting empty date in js code example Example: how to set empty date in javascript var date = Date.parse(dateString) || 0;