LMDDateTimePicker unable to select Month and Year from dialog popup

Using LMDDateTimePicker I am unable to select Month and Year from dialog.
and if I keep the default date and time "30/12/1899 12:00:00" I can't select even the Day.

Andrea

Comments

  • 6 Comments sorted by Votes Date Added
  • Please provide more information or describe in more detail your problem (in best case extract settings of controls out of DFM and provide it here). Placing picker on a form and enabling on CalendarHeader.Elements Month- and Year-buttons seems to work here.
  • object Form1: TForm1
      Left = 0
      Top = 0
      Caption = 'Form1'
      ClientHeight = 299
      ClientWidth = 635
      Color = clBtnFace
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'Tahoma'
      Font.Style = []
      OldCreateOrder = False
      PixelsPerInch = 96
      TextHeight = 13
      object LMDDateTimePicker1: TLMDDateTimePicker
        Left = 172
        Top = 92
        Width = 172
        Height = 21
        Hint = ''
        Bevel.Mode = bmWindows
        Caret.BlinkRate = 530
        TabOrder = 0
        CalendarFormOptions = [cfoShowOkCancelBtns, cfoShowClock, cfoCloseupOnDayClick]
        CustomButtons = <
          item
            Font.Charset = DEFAULT_CHARSET
            Font.Color = clWindowText
            Font.Height = -11
            Font.Name = 'Tahoma'
            Font.Style = []
            Index = 0
            DisplayName = 'TLMDSpecialButton'
            ImageIndex = 0
            ListIndex = 0
            UsePngGlyph = False
          end>
        MinDateTime = -693593.000000000000000000
        MaxDateTime = 999999.000000000000000000
        StartDay = 0
        CalendarHeader.Style.Font.Charset = DEFAULT_CHARSET
        CalendarHeader.Style.Font.Color = clWindowText
        CalendarHeader.Style.Font.Height = -11
        CalendarHeader.Style.Font.Name = 'Tahoma'
        CalendarHeader.Style.Font.Style = []
        CalendarHeader.Style.Bevel.Mode = bmCustom
        CalendarHeader.ButtonFont.Charset = DEFAULT_CHARSET
        CalendarHeader.ButtonFont.Color = clWindowText
        CalendarHeader.ButtonFont.Height = -11
        CalendarHeader.ButtonFont.Name = 'Tahoma'
        CalendarHeader.ButtonFont.Style = []
        CalendarHeader.MonthName.Alignment = taCenter
        CalendarHeader.MonthName.Order = 0
        CalendarHeader.MonthName.UseCaption = True
        CalendarHeader.MonthName.UseGlyph = False
        CalendarHeader.YearValue.Alignment = taCenter
        CalendarHeader.YearValue.Order = 0
        CalendarHeader.YearValue.UseCaption = True
        CalendarHeader.YearValue.UseGlyph = False
        CalendarHeader.MonthUp.Alignment = taRightJustify
        CalendarHeader.MonthUp.Order = 15
        CalendarHeader.MonthUp.Caption = '>'
        CalendarHeader.MonthDn.Alignment = taLeftJustify
        CalendarHeader.MonthDn.Order = -15
        CalendarHeader.MonthDn.Caption = '<'
        CalendarHeader.YearUp.Alignment = taRightJustify
        CalendarHeader.YearUp.Order = 20
        CalendarHeader.YearUp.Caption = '>>'
        CalendarHeader.YearDn.Alignment = taLeftJustify
        CalendarHeader.YearDn.Order = -20
        CalendarHeader.YearDn.Caption = '<<'
        CalendarHeader.MonthCombo.Alignment = taLeftJustify
        CalendarHeader.MonthCombo.Order = 0
        CalendarHeader.YearCombo.Alignment = taLeftJustify
        CalendarHeader.YearCombo.Order = 0
        CalendarHeader.Today.Alignment = taLeftJustify
        CalendarHeader.Today.Order = 0
        CalendarHeader.Today.Caption = 'Today'
        CalendarHeader.Today.UseCaption = True
        CalendarHeader.Today.UseGlyph = False
        TimeSettings.AMSign = 'am'
        TimeSettings.PMSign = 'pm'
        TimeSettings.MSign = 'm'
      end
    end
    png
    png
    LMDDateTimePicker.png
    27K
  • So after your suggestion I enable all buttons and result when you show is not proper.
    Look at the secon image attached.
    png
    png
    LMDDateTimePicker_2.png
    29K
  • I did not suggest to enable ALL options. 
    Either use the combos (user selects month year via comboboxes):  heMonthCombo, heYearCombo
    OR use button items: heMonthBtns, heYearBtns (optionally with *Name elements for display)
  • But is working, the only issue is the first refresh on dialog show.
    If you go with mouse on every button they refresh and show correct caption.
  • This is not a problem with refreshing. As has been mentioned do not turn all options on simultaneously. Use either:
    - Combos (user selects month year via comboboxes):  heMonthCombo, heYearCombo
    - OR button items: heMonthBtns, heYearBtns (optionally with *Name elements for display)
Sign In or Register to comment.