From wiki.ginstr.com
Jump to: navigation, search
(XML Attributes Description)
Line 16: Line 16:
 
! scope="col" | Description
 
! scope="col" | Description
 
|-
 
|-
| title="Attribute" | <code>gn:dataType</code>
+
| title="Attribute" | <code>gn:showOtherDates</code>
| title="Description" | Represents widget data type
+
| title="Description" | By default, only days of one month, in the min-max range, are shown. You can customize this by setting mcv_showOtherDates in xml, or by calling setShowOtherDates()
 +
Flags are described here: https://github.com/prolificinteractive/material-calendarview/wiki/Customization#showing-other-dates
 +
 
 
Can be
 
Can be
* <code>[[Datatypes#dateTime|dateTime]]</code>
+
* <code>other_months</code>
* <code>[[Datatypes#date|date]]</code>
+
* <code>out_of_range</code>
 +
* <code>decorated_disabled</code>
 +
* <code>none</code>
 +
* <code>all</code>
 +
* <code>defaults</code>
 
|-
 
|-
 
| title="Attribute" | <code>gn:s_minDate</code>
 
| title="Attribute" | <code>gn:s_minDate</code>

Revision as of 10:50, 19 March 2020

GnCalendar

Widget XML tag
<com.ginstr.widgets.GnCalendar>
Description
GnCalendar inherits MaterialCalendarView widget.
Provides single, multiple and range date selection.

XML Attributes Description

Attribute Description
gn:showOtherDates By default, only days of one month, in the min-max range, are shown. You can customize this by setting mcv_showOtherDates in xml, or by calling setShowOtherDates()

Flags are described here: https://github.com/prolificinteractive/material-calendarview/wiki/Customization#showing-other-dates

Can be

  • other_months
  • out_of_range
  • decorated_disabled
  • none
  • all
  • defaults
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

Events

gn:act_setClick
gn:act_setLongClick
gn:act_setOnDate

Data types

Input
text
date
dateTime
Output
date
dateTime

Example

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