more G-Labs products

Author Topic: Annual Calendar  (Read 4559 times)

November 26, 2014, 01:02:40 PM
Read 4559 times

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535

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

November 26, 2014, 09:58:03 PM
Reply #1

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
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 class.

g.

November 27, 2014, 09:44:44 AM
Reply #2

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
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

December 01, 2014, 07:30:22 PM
Reply #3

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
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

December 01, 2014, 08:36:19 PM
Reply #4

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer

December 01, 2014, 08:40:43 PM
Reply #5

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
This one seems to be simpler and supporting jquery mobile:

https://github.com/JWGmeligMeyling/jqm-calendar

g.

UPDATE: attacched screenshot
« Last Edit: December 01, 2014, 08:43:35 PM by Gene »

December 02, 2014, 04:03:16 AM
Reply #6

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
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
« Last Edit: December 02, 2014, 04:07:06 AM by dani »

December 03, 2014, 01:23:12 AM
Reply #7

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer

December 03, 2014, 10:15:34 AM
Reply #8

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
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

December 03, 2014, 11:25:26 AM
Reply #9

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
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.

December 03, 2014, 12:38:52 PM
Reply #10

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
Ok Gene, I search my side so

Cheers
Dani

December 27, 2014, 07:58:27 PM
Reply #11

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
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.

December 28, 2014, 02:58:03 AM
Reply #12

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
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!

December 28, 2014, 11:21:23 AM
Reply #13

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
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.

December 30, 2014, 04:06:23 PM
Reply #14

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
This Feature request is moved to this APP CONTRIBUTIONS topic http://www.homegenie.it/forum/index.php?topic=591.0

Cheers
Dani
« Last Edit: December 30, 2014, 04:08:08 PM by dani »