Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

TLMDCalendarComboBox not working

LMD-Tools 2018.1 (31-03-2018) does not give date value as AsDate or Values. Instead error message "No date entered" from LMDCustomMaskEdit is fired. There code
if not (FMaskType in [meDate, meDateTime]) then
    raise ELMDWrongDataType.Create ('No date entered'); 
FMaskType is not set when component is constructed.
Adding "MaskType := meDate;" to constructor TLMDCalendarComboBox.Create(aOwner: TComponent); fixes this issue.
Has there been any use or testing of this component before?

Comments

  • 3 Comments sorted by Votes Date Added
  • Please explain exactly what your problem is or describe your scenario.
    The MaskType is set in TLMDCalendarComboBox.Init, which is immediately called after component is loaded. So I can imagine only special scenarios (e.g. creating instances at runtime) where problem can occur (and even then simple call if Init method is sufficient).
  • I have a form with TLMDCalendarComboBox, not created at runtime, and trying to set date to component raises error. Init set's only this MaskType, nothing else and it's not fired. Setting MaskType on constructor cures the problem. Help file does not mention anything about the Init procedure.
  • trying to set date to component raises error

    I've just checked and the following code works fine:

    LMDCalendarComboBox1.Value := Now + 1;

    Init set's only this MaskType, nothing else and it's not fired

    Init method is called from VCL's standard Loaded method, which is well known and used in many controls. It should be called if the component is not created at run-time, but instead has been placed on the form at design-time.
Sign In or Register to comment.