What is otCalendar?
ot stands for OnyToo, the name used by the original contributor of this library inside Foxite. This library, for those who are not familiar yet with this, has two control class, i.e., _calendar and _datepicker.
I actually preferred this over my own datepicker class as his approach on the dropdown portion has appealed very much to me being not constrained to the boundaries of the parent form where the datepicker will be dragged into. So I ditched my class and use this instead on my own project.
What is new here?
I tried my best to retain the core designs of OnyToo's calendar library and just added some things that appeals to my taste now. Here are what has been changed/added:
Here is the adjusted look:
Hover - Eye Candy
In addition to showing the big number on the right representing the current day, I made hovering among the days change those as well. Just play with it by moving the mouse above the days.
New Color Combinations
Holidays/Notes On-the-ply
As mentioned above, right-clicking a day will allow users to change/add a holiday or a note on the ply.
Holidays versus Notes
Additional Table adjustment
If you already have said calendar class before and would want to overwrite it with this new version, then you need to add a 4th field to holiday.dbf (see highlighted NoteType below)
Caveat:
On-the-ply holiday and notes affect only hDescEn field (for English). I leave hDesc field which is for other localized language. Anyway, the codes are included so you can adjust it if you want.
DatePicker on Grid
I also have adjusted the class to change these things when used on grid:
Afterword:
My Special thanks to OnyToo (real name is Riyan Alfa Sonny, a highly experienced developer from Padang -West Sumatra, Indonesia) for providing us with this wonderful library. For those who don't know yet, the guy has contributed several cool stuff inside foxite like Drilldown Grid, a Form/Screen Splitter class and FoxGrowl notification libraries to name a few.
Download:
The new version can be downloaded here.
P.S. If what you have downloaded is looking for a missing file stickpin.png or dropdown is erring, then redownload again. I forgot to embed the image of the pin inside the class earlier today.
Cheers!
ot stands for OnyToo, the name used by the original contributor of this library inside Foxite. This library, for those who are not familiar yet with this, has two control class, i.e., _calendar and _datepicker.
I actually preferred this over my own datepicker class as his approach on the dropdown portion has appealed very much to me being not constrained to the boundaries of the parent form where the datepicker will be dragged into. So I ditched my class and use this instead on my own project.
What is new here?
I tried my best to retain the core designs of OnyToo's calendar library and just added some things that appeals to my taste now. Here are what has been changed/added:
- Removed the skin I added before, I also removed the extra shape that comes originally with said library. I changed the background of the calendar control class to plain white.
- Change of fonts from Tahoma 8 to Calibri 10 as Calibri appeals more to me these days especially on numbers
- Made the dropdown form wider adding a portion showing the currently selected day in big number plus the day and month below it.
- Added capability to change/add holidays on the ply via utilizing Right-Click of the days.
- Added capability to also include notes via Right-Click on the days as well
- Added visual clues to diffirentiate the days
Here is the adjusted look:
Hover - Eye Candy
In addition to showing the big number on the right representing the current day, I made hovering among the days change those as well. Just play with it by moving the mouse above the days.
New Color Combinations
- Sundays - colored red (comes with stock calendar library)
- Holidays - now with orange backcolor and white forecolor
- Notes - white backcolor, green forecolor, boxed
- Current day number - white backcolor, blue forecolor, boxed
Holidays/Notes On-the-ply
As mentioned above, right-clicking a day will allow users to change/add a holiday or a note on the ply.
- Holiday or Note? An optiongroup to allow users to select whether it is a note or holiday
- Save - save changes made and hides the note section, showing big numbers again
- Abort - Cancel saving and hides the note section
- Clear - Remove any previous holiday or note on said day
Holidays versus Notes
- Holidays - will be sought by the class disregarding the year. Meaning what is important with the class is only the month and the day so the class will reuse those that are marked as holiday on every year
- Notes - will be sought by the class based on the complete date. Unlike holidays which is being reused, notes will be shown only once which is on the specific date of the note
Additional Table adjustment
If you already have said calendar class before and would want to overwrite it with this new version, then you need to add a 4th field to holiday.dbf (see highlighted NoteType below)
Caveat:
On-the-ply holiday and notes affect only hDescEn field (for English). I leave hDesc field which is for other localized language. Anyway, the codes are included so you can adjust it if you want.
DatePicker on Grid
I also have adjusted the class to change these things when used on grid:
- Auto acquiring of Column's ControlSource
- Auto turning parent's column Sparse into .F.
- Auto setting CurrentControl into this class
- Auto-Resizing Grid's RowHeight to accommodate this class
- Auto-Resizing Column's Width to accommodate this class
Afterword:
My Special thanks to OnyToo (real name is Riyan Alfa Sonny, a highly experienced developer from Padang -West Sumatra, Indonesia) for providing us with this wonderful library. For those who don't know yet, the guy has contributed several cool stuff inside foxite like Drilldown Grid, a Form/Screen Splitter class and FoxGrowl notification libraries to name a few.
Download:
The new version can be downloaded here.
P.S. If what you have downloaded is looking for a missing file stickpin.png or dropdown is erring, then redownload again. I forgot to embed the image of the pin inside the class earlier today.
Cheers!