ForgeComponents
en

Components

j-IsOpen

jComponent 20 · jcomponent@20 component Example loaded with jComponent 20

j-IsOpen is a simple component for showing opening hours. The component supports auto-refresh datetime.

Tangular model properties:

{{ date }}    - (date) current date instance
{{ month }}   - (number) current month (1=januar ... 12=december)
{{ year }}    - (number) current year
{{ day }}     - (number) current day number in calendar
{{ daytype }} - (number) current day type (0=sunday ... 6=saturday)
{{ minutes }} - (number) current minutes
{{ hours }}   - (number) current hours
{{ week }}    - (boolean) is weekend?

Use it with <ui-component name="isopen">. When the component is not loaded yet, jComponent downloads it on first use from the address in DEF.fallback (the Componentator CDN by default). Author: Peter Širka. Source: the Componentator components repository, MIT license.

example.html
<ui-component name="isopen" config="class:hidden" class="hidden">
	<script type="text/html">
		{{ if week }}<span class="closed">closed</span>{{ else }}<span class="open">open</span>{{ fi }}
		<div>07:00 - 09:00</div>
	</script>
</ui-component>