Recent

Author Topic: Calendarlite ort calendar  (Read 997 times)

eldonfsr

  • Sr. Member
  • ****
  • Posts: 446
Calendarlite ort calendar
« on: August 08, 2020, 04:56:32 am »
Hi friends i need a calendar to show a dates stores on db, i test rxcalendar but only show selected one date i need to show selected several days, also i testes calendarlite but dont show de seleted dates, i can print the array with selecteddates but in calendar don't show selected those dates, some body do some think like that can help me what is the best way to do that...


thanks
Fernando 

eldonfsr

  • Sr. Member
  • ****
  • Posts: 446
Re: Calendarlite ort calendar
« Reply #1 on: August 08, 2020, 06:38:12 am »
well i solved this problem on calendar has method called on month change next code solve the problem

procedure TFormMain.CalendarLite1MonthChange(Sender: TObject);
Var Month:Integer;
begin
   CalendarLite1.ClearSelectedDates;
   SQLQLog.First;
   Month := MonthOf(CalendarLite1.Date);
   while not SQLQLog.EOF do  begin
       if(sqlqlOG.FieldByName('INFO').AsString <> '') then begin
         IF( MonthOf(sqlqlOG.FieldByName('INFO').AsDateTime) = Month ) then begin
             CalendarLite1.AddSelectedDate(sqlqlOG.FieldByName('INFO').AsDateTime);
         end;
       end;
     SQLQLog.Next;
   end;
   Calendarlite1.Refresh;
end;   

I Take values from sql database table

Best regards
Fernando

 

TinyPortal © 2005-2018