HomeGenie Forum
Development => Feature request => Topic started by: dani on November 26, 2014, 01:02:40 PM
-
It will be great to add an annual calendar which define working days and free days and others.. Each day of the year will be defined by a byte in some database reading by the scheduler.
If you have any samples, I can make integration in the scheduler.
Cheers
Dani
-
Hi Dani,
please let me better understand what you want to achieve.
Do you want to write a calendar widget for defining schedule items?
Do you need a place to store some data?
To store data you can use the SettingsHelper (http://www.homegenie.it/docs/doxy/d4/d6c/class_home_genie_1_1_automation_1_1_scripting_1_1_settings_helper.html) class.
g.
-
Hi Gene,
Yes I want to write a calendar WidGet and store the data that can be used by the scheduler.
The data of calendar (365 or 366 bytes by year) can be used calling by Modules or Scenarios in the cron schedule for sample we can used @Calendar(X). Where X will be the letter of the DayOfYear in the data.
For the scheduler it seems very simple :
In C# we can get the DayOfYear by calling DateTime.DayOfYear(), and search the letter in Data stored at the index for the current Year.
But for the widget I don't konow how to do that. Have you some samples to guide me ?
This will be good to define scenarii using during special days or hollidays.
Cheers
Dani
-
Hi All,
Is sombody has some .json samples for a multiselect calendar ?
For each Day or Group of day, I want it's possible to select à type of day (Working Day, Free Day, Special Day, and so on) and show different colors regardless the type of day.
Thank's
Dani
-
Something like this:
http://fullcalendar.io/ (http://fullcalendar.io/)
?
g.
-
This one seems to be simpler and supporting jquery mobile:
https://github.com/JWGmeligMeyling/jqm-calendar
g.
UPDATE: attacched screenshot
-
I found thé first one also but it's so complicate fort our use.
I think as you your second choice will be good.
For this calendar, I propose to create a scenario for wihich the widget will be had in the Dashbord !
Thank's Gene
Dani
-
Hey Dani,
what about this one:
http://dev.jtsage.com/jQM-DateBox/ (http://dev.jtsage.com/jQM-DateBox/)
?
g.
-
Thank's Gene,
But I Need a multi select DatePicker, wich can send event to the widget when a date is selected.
Yesterday I made some try with jqm-calendar, but I don't agree the result for now. I need some function that is not include in the project, and I am not a specialist of JS, I don't know not yet a lot of function we can use.
Cheers
Dani
-
If we find a valid calendar plugin compatible wih jquery mobile, I'll add it as part of HG, so any hg widget could use it.
Till now didn't find a valid calendar plugin =/ I'll do more searching.
The best would be have it integrated in the Scheduler UI and then make it poppable from any other widget. This will require more thinking I guess.
g.
-
Ok Gene, I search my side so
Cheers
Dani
-
Hello Gui's,
I have made my annual calendar that can be used by scheduler after.
it's consist of 12 strings by pair or impair year, one string by month. each day of the month can take 4 values :
W : Week-end White Color
O : Open days (Working days) Blue color
F : Free days (as 1rst january for exemple) Green color
S : Special days (as hollidays for exemple) Red color
For change the kind of day you have just to click the day. For validate you have to change of month instead of the modification are invalidate.
Here I join for files the screenshot, the calendrier.html and calendrier .json have to be locate in control/widgets/DaniMail/generic
The hgx has to be import in the scenarios.
-
This is very interesting! One question...does this allow for holidays that fall on a given day of week rather than date? E.g., in the US, we have a holiday on the 3rd Thursday of November (Thanksgiving). Excellent work!
-
By default, the calendar is calculate with saturday an sunday as week-end.
Free days are the map of France. 1/01, 1/05, 8/05, 14/07, 15/08, 1/11, 11/11 and 25/12.
Working days are all the others.
Hollidays are at your convinience.
But it'seasy to modify the source code of the HGX.
-
This Feature request is moved to this APP CONTRIBUTIONS topic http://www.homegenie.it/forum/index.php?topic=591.0 (http://www.homegenie.it/forum/index.php?topic=591.0)
Cheers
Dani