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