Instead of passing empty string to the DateTextBox you need to pass the literal null
or undefined
. I put together a jsfiddle demonstrating the different types of values and how they initially display:
require(['dijit/form/DateTextBox', 'dojo/domReady!'], function (DateTextBox) {
//initial value current date
new DateTextBox({
value: new Date()
}).placeAt('myBody');
//no value
new DateTextBox({
}).placeAt('myBody');
//null value
new DateTextBox({
value: null
}).placeAt('myBody');
//undefined value
new DateTextBox({
value: undefined
}).placeAt('myBody');
//empty string value
new DateTextBox({
value: ''
}).placeAt('myBody');
});