>if not dodefault() > return .f. >endif > >with this > if empty(.cControlSource) > .cControlSource = .controlsource > endif > > if empty(.cControlSource) > if .lDateTime > .value = iif(.lCurrent,datetime(),{//::}) && Initialize with the current or empty datetime > else > .value = iif(.lCurrent,date(),{}) && Initialize with the current or empty date > endif > endif > > if type('.ControlSource') = "C" or .lDateTime > do case > case .lDateTime OR type(.controlsource) = "T" > * we can not set format to R > .Format = "R" > > otherwise > .format = "D" > .inputmask = "" > endcase > endif >endwith >>