Topic: Big Calendar Sample
Here is a sample of a project that generates a big calendar view. There a probably many ways of generating a calendar, this is just one way. Hope this helps someone.
My Visual Database → Script → Big Calendar Sample
Here is a sample of a project that generates a big calendar view. There a probably many ways of generating a calendar, this is just one way. Hope this helps someone.
Hello.
Thank you for the example.
It's not good idea to use StrToDate in the example, because another machine may have different date format.
Check it out
procedure frm_Main_Show (Sender: string; var Cancel: String);
var
DaysInCurrentMonth, FirstDayOfWeek, CurrentDay, CurrentMonth,CurrentYear, i: int;
FirstOfTheMonth, LastOfTheMonth: date;
DD, MM, YY: word;
begin
DecodeDate(frm_Main.main_calendar.Date, YY, MM, DD);
DaysInCurrentMonth := DaysInMonth(YY, MM);
CurrentDay := DD;
CurrentMonth := MM;
CurrentYear := YY;
FirstOfTheMonth := EncodeDate(YY, MM, 1);
LastOfTheMonth := EncodeDate(YY, MM, DaysInCurrentMonth);
FirstDayOfWeek := DayOfWeek(FirstOfTheMonth);
frm_Main.fld_day.Caption :=Formatdatetime('mm/dd/yyyy',frm_Main.main_calendar.Date);
frm_main.DaysInCurrentMonth.Caption := IntToStr(DaysInCurrentMonth);
frm_Main.fld_CurrentMonth.Caption := Formatdatetime('mmmm',frm_Main.main_calendar.Date)+ ' ' + Formatdatetime('yyyy',frm_Main.main_calendar.Date);
//generate big calendar
BigCalendar('',FirstDayOfWeek,CurrentMonth, CurrentYear, DaysInCurrentMonth);
end;
My Visual Database → Script → Big Calendar Sample
Powered by PunBB, supported by Informer Technologies, Inc.
Theme Hydrogen by Kushi