do FORM SCREEN\DatePick.SCX with this.Parent.txtDatum name CALENDAR with this.Parent CALENDAR.left = .left + ln_Left + ln_BorderWidth CALENDAR.top = .top + .Height + ln_Top + ln_TitleHeight + ln_BorderHeight CALENDAR.show endwithIn the form's init
lparameters to_Target, td_Start with this .Hide .Calendar.Backcolor = .BackColor .Width = .calendar.Width + (2* .Calendar.Left) if vartype(td_Start) = "D" .d_Start = td_Start endif if vartype(to_Target) = "O" and ! isNull(to_Target) .o_Target = to_Target if vartype(to_Target.Value) = "D" and ! empty(to_Target.Value) ld_This = to_Target.Value else ld_This = .d_Start endif endif ..... endwithIn the LostFocus
This.QueryUnload This.ReleaseAnd in the QueryUnload of the form
if vartype(this.o_Target) = "O" and ! isNull(This.o_Target) with this.Calendar ld_Datum = date(.Year, .Month, .day) this.o_Target.value = iif(ld_Datum <= {^1900-01-01}, {//}, ld_Datum) this.o_Target.Refresh this.o_Target.SetFocus endwith endif this.o_Target = .NULL. dodefault()Hope this helps to see through it. Maybe You can use this approach