Week Input Component

Week Input component is an input field for capturing week ID of a particular year. Bissetii did a number of researches on its own and decided to only provide styling for proper HTML5 semantic syntax defined by w3.org.

This component is available starting from v1.12.1.

Hugo

All Week Input Hugo interface is directly supported by Form Component.

Go

All Week Input Go interface is directly supported by Form Component.

HTML

Expanding from Form Component, Week Input component is to facilitate selecting week number of a year. Depending on brower support, should the browser fails to facilitate a datepicker user interface, the field will gracefully fallback to <input type="text">.

To ensure the data is working, ALWAYS facilitate the following pattern just in case the fallback happens.

1
\d{4}-W\d{2}

An all compatible attributes HTML syntax is shown as follows:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
<label for="input-javascript-id">Date</label>
<input type="week"
	id="input-javascript-id"
	name="example"
	value="2016-W06"
	min="1950-W12"
	max="3000-W12"
	pattern="\d{4}-W\d{2}"
	required
	disabled
	autofocus
	autocomplete
	readonly
	list="datalist-id"
/>
<datalist id="datalist-id">
	<option value="1985-W06" />
	...
</datalist>

Here is an example:

CSS

All Week Input CSS variables is directly supported by Form Component.

Javascript

All Week Input Javascript is directly supported by Form Component.

Sass

All Week Input Sass is directly supported by Form Component.

Researches

Here are the researches done to ensure Week Input component meets the necessary quality assurances:

SCHEDULED COMING SOON

Epilogue

That’s all about Week Input component in Bissetii. If you need more feature or need to report a bug, please feel free to file an issue at our Issue Section.