Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
4
Erster Beitrag:
vor 4 Jahren, 10 Monaten
Letzter Beitrag:
vor 4 Jahren, 10 Monaten
Beteiligte Autoren:
Piet van Zanten, GuenterP, Arie, Allard

calender control (wb18)

Startbeitrag von Allard am 03.06.2013 15:18

Hi

I was wondering if it was possible to add a color to a date if that date has a record.

I want to use the calendar control ( the one like the date picker ) as a navigation for the scheduler control. I managed to change the scheduler control to change month / week etc if the calendar control was clicked. But I want the scheduler control to be standard in week modus ad I want to use the calendar control in month view.

If an appointment is made I want to calendar control to change the color of the date. So it kind of shows the user that on that particular date an appointment is made.

Like in outlook. If an appointment is made . the small calendar shows you a bold date

Is this possible, I couldn’t find it in the calendar control

regards,

Allard

Antworten:

Allard,
you could add those dates with the BankHolidayAdd() function. Not exactly what you mean, but it may be good enough for your situation

von Arie - am 03.06.2013 16:38
Hi Allard,

this example's description is in German, but google will help with a translation, I'm sure of. The example demonstrates how to incorporate non-banking holidays, i.e. floating holidays like easter and other independent holidays into the calendar control:

http://www.windev.at/wp_de/?page_id=396

von GuenterP - am 03.06.2013 20:30
Hi Allard,

I have a procedure in the "Displaying a month in CAL_Calendar" server code.
The procedure does a query on all events between the start and end date of the month.
Then you browse the query and set an attribute for the date, in this case the background color:
PROCEDURE DisplayMonth(sDate="")
dDate,dDateEnd is Date
sSQL is string
dsMySource is Data Source

IF sDate"" THEN CAL_Calendar=sDate
dDate=CalendarPosition(CAL_Calendar)
dDateEnd=dDate
dDateEnd..Month++
dDateEnd..Day--

sSQL=[
SELECT
BD_AgendaDag.Datum AS Datum,
FROM
BD_AgendaDag
WHERE
BD_AgendaDag.Datum BETWEEN '%1' AND '%2'
ORDER BY
Datum ASC
]
sSQL=StringBuild(sSQL,dDate,dDateEnd)
HExecuteSQLQuery(dsMySource,hQueryDefault,sSQL)
FOR ALL dsMySource
CAL_Calendar[dsMySource.Datum]..BrushColor=const_EventColor
END

Regards,
Piet

von Piet van Zanten - am 04.06.2013 08:58
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.