Date time editable
Widget is used for selecting and preview date and time by user. Value will be stored as datatype dateTime.
Widget id, ${gbamID}:
dateTimeEditable
Back to GBAM widgets table
Datatypes
Value is stored from widget to database as dateTime
datatype.
Predefined user data
PreLoaded
Properties panel
User will configure this data in properties panels of selected widget:
GENERAL
- "label",
${widgetLabel}
- "12 / 24 hour time format" checkbox if selected, the widget will be displayed in 24 hour format, by default it is checked. ${is24HourFormat}=
gn:is24HourFormat="@variable/${widgetID}_inputIs24HourFormat"
- if checked then add to variables.xml
<variable id="${widgetID}_inputIs24HourFormat" type="status" defaultValue="true">true</variable>
- if unchecked then add to variables.xml
<variable id="${widgetID}_inputIs24HourFormat" type="status" defaultValue="false">false</variable>
VALIDATIONS
- -
ACTION
- -
ACTION MESSAGES
- -
DATABASE
- "is part of database", checkbox option by default is set as checked. When checked database column is created for this widget.
- "additional ginstr web column settings":
- "required", add to configuration.xml:
<columnDateTime required="true|false"></columnDateTime>
- "minDate", add to configuration.xml:
<columnDateTime> <minDate>yyyy-mm-dd</minDate> </columnDateTime>
- "maxDate", add to configuration.xml:
<columnDateTime> <maxDate>yyyy-mm-dd</maxDate> </columnDateTime>
- "minTime", add to configuration.xml:
<columnDateTime> <minTime>hh:mm:ss</minTime> </columnDateTime>
- "maxTime", add to configuration.xml:
<columnDateTime> <maxTime>hh:mm:ss</maxTime> </columnDateTime>
- "preset", add to configuration.xml:
<columnDateTime> <preset>yyyy-mm-dd</preset> </columnDateTime>
- "defaultFilter", add to configuration.xml:
<columnDateTime> <defaultFilter>today|yesterday|currentWeek|lastWeek|currentMonth|lastMonth|untilToday|fromToday|untilTomorrow|fromTomorrow|currentYear|lastYear</defaultFilter> </columnDateTime>
- "setCurrent", add to configuration.xml:
<columnDateTime> <setCurrent>true|false</setCurrent> </columnDateTime>
- "notEditable", add to configuration.xml:
<columnDateTime> <notEditable>true|false</notEditable> </columnDateTime>
- "related unique columns", add to configuration.xml:
<columnDateTime> <uniqueInsideList> <reference> <table>refTableId1</table> <column>refColumnField1</column> </reference> <reference> <table>refTableId2</table> <column>refColumnField2</column> </reference> </uniqueInsideList> </columnDateTime>
Code snippets
GBAM Code Variables
Variables which are used in code snippet below but not defined in user modifiable inputs.
Common widget code
<com.ginstr.widgets.GnTextView android:id="@+id/${widgetID}_label" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/${widgetID}" gn:style="@style/dateTimeEditable_label"/> <com.ginstr.widgets.GnDateTimePicker android:id="@+id/${widgetID}_input" android:layout_width="match_parent" android:layout_height="wrap_content" ${is24HourFormat} gn:data_type="dateTime"/>
strings.xml
Lines to be added for each language.
<string name="${widgetID}">${widgetLabel}</string>