As always this is a logic issue not a delphi issue.
As a human, how would you tell if "day shopping - 11am-6pm 19th Dec" clashes with "dentist - 4pm 18th Dec" or "Joe coming for dinner - 5.45pm 19th Dec" ?? (these appointments are ficticious as I could never ever spend that much time shopping, hate it)
the TCalender component does, but not in the way you probably think. It doesnt work like MS outlook and so on.
TMS have a few components that would go to make an outlook style appointment thing which simplifies the whole display element.
As for adding an edit box to your grid - its covered in multitudes of tutorials. Have a google.
LizR
Posting Virtuoso
1,791 posts since Aug 2008
Reputation Points: 196
Solved Threads: 190
If you want to put it in a cell of a dbgrid, you'd change the db entry.. But your original post implied more of inserting a component into a dbgrid which is of course on google by the ton.
You didnt answer how YOU as a human would work it out - the answer is the same with the computer, you just need to write it down. The computer has no concept of calender, only humans, so you need to explain to it how you want it to work.
LizR
Posting Virtuoso
1,791 posts since Aug 2008
Reputation Points: 196
Solved Threads: 190
Well then, as a human you need to write that down in an if statement for the computer.
A little like the "Does this glass need topping up?"
If person has glass, and glass < full and they want more, add till glass = nearly full.
each appointment has 2 specific fields of interest, start and end. Your statement covers those - ergo you can solve that one.
Dont have delphi to hand but I believe you will find that is really all the calendar component in delphi is for, picking dates - there are 2 but they are pretty much the same. I drew my own once made a TYearCal which had data behind it to shade days and so on.
LizR
Posting Virtuoso
1,791 posts since Aug 2008
Reputation Points: 196
Solved Threads: 190
I am not certain I understand what you are asking. That is to say what level of experience you have with programming in general. You mention using DB related compnenets, but it is not clear if you understand (yet) how they work There are several excellent tutorial sites: Delphi.about.com has a great deal about database component use with example code that will either show you how or fill in gaps in your understanding depending upon your needs and understanding. Another good site for getting a good base in Delphi programming is at 30 Camtasias area in Nick Hodges site http://blogs.codegear.com/nickhodges .
jsosnowski
Junior Poster in Training
68 posts since Nov 2007
Reputation Points: 11
Solved Threads: 11