sugiroksuma

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: tsmonthcalendar – holiday #47505
    sugiroksuma
    Participant
    'Support' wrote:

    Hello!

    I'm sorry, but I not quite understand your message. You have a suggestion or a question?

    Hello!

    Example I have a home date on Dec. 25 recorded in the database, like that in tsmonthcalendar that date shows up in bold

    In MonthCalendar I get the following cod.

    Code:
    procedure TFormprincipal.MonthCalendar1GetMonthInfo(Sender: TObject;
    Month: Cardinal; var MonthBoldInfo: Cardinal);
    var
    dias :array of cardinal;
    DATA,DATENOW :TDATETIME;
    begin
    DM.Q_bold.CLOSE;
    DM.Q_bold.SQL.CLEAR;
    DM.Q_bold.SQL.TEXT:='SELECT DISTINCT DATA FROM TB_agenda';
    DM.Q_bold.OPEN;
    DM.Q_bold.FIRST;

    WHILE NOT DM.Q_bold.EOF DO
    BEGIN
    DATA:=DM.Q_bold.FIELDBYNAME('DATA').AsDateTime;

    SetLength(dias,DM.Q_bold.RECORDCOUNT);

    DATENOW:= STRTOINT(FORMATDATETIME('MM',DATA));

    if month = DATENOW THEN
    BEGIN
    MonthBoldInfo:=0;
    dias[DM.Q_negrito.RECNO-1]:= STRTOINT(FORMATDATETIME('DD',DATA));
    MonthCalendar1.BoldDays(dias,MonthBoldInfo);
    END;

    DM.Q_bold.Next;
    end;
    end;

Viewing 1 post (of 1 total)