From wiki.ginstr.com
Jump to: navigation, search
m
Line 1: Line 1:
 +
<div style="float:right; clear:both; margin-left:0.5em;">__TOC__</div>
 +
<span STYLE="font-size: xx-large"><code>GnDatePicker</code></span>
 +
[[Category:Widget_Library]]
 +
 +
;Widget XML tag
 +
: <code><com.ginstr.widgets.GnDatePicker></code>
 +
 +
;Description
 +
: <code>[[GnDatePicker]]</code> inherits regular Android <code>[http://developer.android.com/reference/android/widget/DatePicker.html DatePicker]</code> widget.
 +
: It provides date entry.
 +
 +
==XML Attributes Description==
 +
{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
 +
|-
 +
! scope="col" | Attribute
 +
! scope="col" | Description
 +
|-
 +
| title="Attribute" | <code>[[#gn:s_minDate|gn:s_minDate]]</code>
 +
| title="Description" | Sets minimum permitted date
 +
Can be
 +
* <code>current</code> - Sets the current date as minimum date
 +
* <code>minusX</code> - Sets minimum date as current date minus <code>X</code> days
 +
* <code>plusX</code> - Sets minimum date as current date plus <code>X</code> days
 +
|-
 +
| title="Attribute" | <code>[[#gn:s_maxDate|gn:s_maxDate]]</code>
 +
| title="Description" | Sets maximum permitted date
 +
Can be
 +
* <code>current</code> - Sets the current date as maximum date
 +
* <code>minusX</code> - Sets maximum date as current date minus <code>X</code> days
 +
* <code>plusX</code> - Sets maximum date as current date plus <code>X</code> days
 +
|}
 +
 +
==Example==
 +
<syntaxhighlight code="xml">
 +
<com.ginstr.widgets.GnDatePicker
 +
  android:id="@+id/meter_deinstallationDate"
 +
  android:visibility="gone"
 +
  android:layout_width="match_parent"
 +
  android:layout_height="wrap_content"
 +
  gn:dataType="date" />
 +
</syntaxhighlight>
 +
 +
 +
 +
 +
 +
 +
 +
 +
 
<div style="float:right; clear:both; margin-left:0.5em;">__TOC__</div>
 
<div style="float:right; clear:both; margin-left:0.5em;">__TOC__</div>
 
<span STYLE="font-size: xx-large"><code>GnDatePicker</code></span>
 
<span STYLE="font-size: xx-large"><code>GnDatePicker</code></span>

Revision as of 09:10, 17 March 2017

GnDatePicker

Widget XML tag
<com.ginstr.widgets.GnDatePicker>
Description
GnDatePicker inherits regular Android DatePicker widget.
It provides date entry.

XML Attributes Description

Attribute Description
gn:s_minDate Sets minimum permitted date

Can be

  • current - Sets the current date as minimum date
  • minusX - Sets minimum date as current date minus X days
  • plusX - Sets minimum date as current date plus X days
gn:s_maxDate Sets maximum permitted date

Can be

  • current - Sets the current date as maximum date
  • minusX - Sets maximum date as current date minus X days
  • plusX - Sets maximum date as current date plus X days

Example

<com.ginstr.widgets.GnDatePicker
  android:id="@+id/meter_deinstallationDate" 
  android:visibility="gone"
  android:layout_width="match_parent" 
  android:layout_height="wrap_content"
  gn:dataType="date" /> 





GnDatePicker

Inherited classes
View
Android class type
DatePicker
Widget XML tag
<com.ginstr.widgets.GnDatePicker>


GnDatePicker provides date entry.

If layout configuration options below are not required, Android DatePicker can be used instead.

XML Attributes Description

Attribute Description
gn:s_minDate Sets minimum permitted date
gn:s_maxDate Sets maximum permitted date

gn:s_minDate

Sets minimum permitted date

(String) values = current, minusX, plusX

Value Description
current Sets the current date as minimum date
minusX Sets minimum date as current date minus X days
plusX Sets minimum date as current date plus X days

gn:s_maxDate

Sets maximum permitted date

(String) values = current, minusX, plusX

Value Description
current Sets the current date as maximum date
minusX Sets maximum date as current date minus X days
plusX Sets maximum date as current date plus X days