Calendar Interface
- class epyk.interfaces.components.CompCalendars.Calendar(ui)
- agenda(task, start, end, details=None, location=None, icon: str = 'calendar', text: str = 'Add to Calendar', options: Optional[dict] = None, profile: Optional[Union[bool, dict]] = None)
Usage:
:tags: :categories:
Templates:
Related Pages:
TODO: improve the time management in this component
- Parameters:
task –
start –
end –
details – Optional.
location – Optional.
icon – Optional. A string with the value of the icon to display from font-awesome
text – Optional. The value to be displayed to the button
profile – Optional. A flag to set the component performance storage
options – Optional. Specific Python options available for this component
- days(month: Optional[int] = None, content=None, year: Optional[int] = None, width: Optional[Union[tuple, int, str]] = (None, '%'), height: Optional[Union[tuple, int, str]] = (None, 'px'), align: Optional[str] = None, options: Optional[dict] = None, html_code: Optional[str] = None, profile: Optional[Union[bool, dict]] = None)
- Tags:
- Categories:
Usage:
content = { "2020-07-02": {'task1': 50, 'task2': 50}, "2020-07-03": {'task1': 100}, "2020-07-21": {'task4': 100}, "2020-07-22": {'task4': 100} } july = page.ui.calendars.days(7, content, align="center", options={"colors": {"task4": 'red'}}) july.task('task1', start="2020-07-10", capacity=[50, 30, 10, 80]) july.task('task4', start="2020-07-20", capacity=[50, 40, 10]) july.weekly("task6", start="2020-07-02", capacity=3, frequency=2, options={'unit': 8})
Templates:
Related Pages:
- Parameters:
month – Optional. The month number
content –
year –
width – Optional. A tuple with the integer for the component width and its unit
height – Optional. A tuple with the integer for the component height and its unit
align – Optional. The text-align property within this component
html_code – Optional. An identifier for this component (on both Python and Javascript side)
profile – Optional. A flag to set the component performance storage
options – Optional. Specific Python options available for this component
- forecast(month_period: int, content: Optional[str] = None, width: Optional[Union[tuple, int, str]] = (100, '%'), height: Optional[Union[tuple, int, str]] = (None, 'px'), position: str = 'top', options: Optional[dict] = None, profile: Optional[Union[bool, dict]] = None)
Display a forecast based on a dictionary containing the values for several months
Usage:
:tags: :categories:
Templates:
Related Pages:
- Parameters:
month_period – Number of months of forecast
content – Optional.
width – Optional. A tuple with the integer for the component width and its unit
height – Optional. A tuple with the integer for the component height and its unit
position – Optional. The position compared to the main component tag
profile – Optional. A flag to set the component performance storage
options – Optional. Specific Python options available for this component
- google(task, start: str, end: str, details=None, location=None, icon: str = 'google_plus', text: str = 'Add to Google Calendar', options: Optional[Union[bool, dict]] = None, profile: Optional[Union[bool, dict]] = None)
Add link to the google calendar. Will add the event to the Calendar.
Usage:
page.ui.calendars.google("hrehr", "Test", "20200801T153000Z", "20200802T163000Z")
Templates:
- Tags:
- Categories:
Related Pages:
TODO: improve the time management in this component
- Parameters:
task –
start – Date format YYYYMMDD
end – Date format YYYYMMDD
details – Optional.
location – Optional.
icon – Optional. A string with the value of the icon to display from font-awesome
text – Optional. The value to be displayed to the button
profile – Optional. A flag to set the component performance storage
options – Optional. Specific Python options available for this component
- legend(record: list, width: Optional[Union[tuple, int, str]] = (None, '%'), height: Optional[Union[tuple, int, str]] = (None, 'px'), align: Optional[str] = None, options: Optional[dict] = None, profile: Optional[Union[bool, dict]] = None)
Add a legend to a Calendar component.
- Tags:
- Categories:
Usage:
monthly = page.ui.calendars.months(content=records, align="center") page.ui.calendars.legend(monthly.tasks)
Templates:
Related Pages:
- Parameters:
record – Optional. The list of dictionaries with the input data
width – Optional. A tuple with the integer for the component width and its unit
height – Optional. A tuple with the integer for the component height and its unit
align – Optional. The text-align property within this component
profile – Optional. A flag to set the component performance storage
options – Optional. Specific Python options available for this component
- months(content: Optional[dict] = None, width: Optional[Union[tuple, int, str]] = (None, '%'), height: Optional[Union[tuple, int, str]] = (None, 'px'), align: Optional[str] = None, options: Optional[dict] = None, html_code: Optional[str] = None, profile: Optional[Union[bool, dict]] = None)
- Tags:
- Categories:
Usage:
records = { 1: {"Project 1": 12, "Project 2": 30}, 2: {"Project 1": 12, "Project 2": 30}, 3: {"Project 1": 42, "Project 2": 30}, 4: {"Project 1": 15, "Project 2": 30}, 5: {"Project 1": 12, "Project 2": 30}, 6: {"Project 1": 12, "Project 2": 30}, 7: {"Project 1": 12, "Project 2": 30}, } monthly = page.ui.calendars.months(content=records, align="center") monthly.style.css.margin_top = 10
Templates:
Related Pages:
- Parameters:
content – Optional. The Pie charts values
width – Optional. A tuple with the integer for the component width and its unit
height – Optional. A tuple with the integer for the component height and its unit
align – Optional. A string with the horizontal position of the component
html_code – Optional. An identifier for this component (on both Python and Javascript side)
profile – Optional. A flag to set the component performance storage
options – Optional. Specific Python options available for this component
- pill(text: str, value=None, group=None, width: Optional[Union[tuple, int, str]] = ('auto', ''), height: Optional[Union[tuple, int, str]] = (None, 'px'), html_code: Optional[str] = None, tooltip: Optional[str] = None, profile: Optional[Union[bool, dict]] = None, options: Optional[dict] = None)
Usage:
pill = page.ui.calendars.pill("4D") page.ui.button("Click").click([page.js.alert(pill.dom.content)])
Templates:
- Tags:
- Categories:
- Parameters:
text – Optional. The value to be displayed to the button
value – Optional.
group – Optional.
width – Optional. A tuple with the integer for the component width and its unit
height – Optional. A tuple with the integer for the component height and its unit
html_code – Optional. An identifier for this component (on both Python and Javascript side)
tooltip – Optional. A string with the value of the tooltip
profile – Optional. A flag to set the component performance storage
options – Optional. Specific Python options available for this component
- timer(minutes: int, text: str = '', width: Optional[Union[tuple, int, str]] = (None, '%'), height: Optional[Union[tuple, int, str]] = (None, 'px'), align: Optional[str] = None, options: Optional[dict] = None, html_code: Optional[str] = None, profile: Optional[Union[bool, dict]] = None)
- Tags:
- Categories:
Usage:
page = pk.Page() dt = page.ui.calendars.timer(5)
- Parameters:
minutes –
text – Optional. The value to be displayed to the timer
width – Optional. A tuple with the integer for the component width and its unit
height – Optional. A tuple with the integer for the component height and its unit
align – Optional. The text-align property within this component
html_code – Optional. An identifier for this component (on both Python and Javascript side)
profile – Optional. A flag to set the component performance storage.
options – Optional. Specific Python options available for this component.