Thnx 4 reply!
My advice:
datebox.js
// ...
// line 62
$.extend(state.calendar.calendar('options'), {
fit:true,
border:false,
onSelect:function(date){
var target = this.target;
var opts = $(target).datebox('options');
var calendar = $(target).datebox('calendar'); // +
opts.onSelect.call(target, date);
calendar.calendar('moveTo', date); // +
setText(target); // +
// - setValue(target, opts.formatter.call(target, date));
$(target).combo('hidePanel');
}
});
// ...
// line 128
function doEnter(target){
var state = $.data(target, 'datebox');
var opts = state.options;
var current = state.calendar.calendar('options').current;
if (current){
setText(target); // +
$(target).combo('hidePanel');
// - setValue(target, opts.formatter.call(target, current));
}
}
function setValue(target, value, remainText){
var state = $.data(target, 'datebox');
var opts = state.options;
var calendar = state.calendar;
calendar.calendar('moveTo', opts.parser.call(target, value));
if (remainText){
$(target).combo('setValue', value);
} else {
setText(target); // +
// - if (value){
// - value = opts.formatter.call(target, calendar.calendar('options').current);
// - }
// - $(target).combo('setText', value).combo('setValue', value);
}
}
function setText(target){ // +
var state = $.data(target, 'datebox')
, opts = state.options
, calendar = state.calendar
, value = opts.formatter.call(target, calendar.calendar('options').current)
;
$(target).combo('setText', value).combo('setValue', value);
}
}
// ...
// line 224
setDate: function(jq, date){
return jq.each(function(){
var opts = $(this).datebox('options');
$(this).datebox('calendar').calendar('moveTo', date);
// - setValue(this, date ? opts.formatter.call(this, date) : '');
setText(this); // +
});
},