blob: b7a3ed4ca3aed90a9e1e1253f25f2f82edeb39ba [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<widget id="tizen.datetimepicker" displayName="Date Time Picker"
smallIcon="datetimepicker_small.png" icon.16="datetimepicker_16.png"
category="Form Elements"
description="The date time picker widget enables users to select a date and a time."
helpCategory="Tizen_Widget"
helpContents="datetimepicker"
borderVisible="false">
<property name="id" type="string" displayName="ID" default="" category="Common">
<condition name="string-id" error="string-id"/>
</property>
<property name="type" type="tizen.datetimepicker@type" displayName="Type" default="" initValue="datetime"
tooltip="Defines the picker style">
<condition name="disable-property" value="date" target="timeformat"/>
<condition name="disable-property" value="time" target="dateformat"/>
</property>
<property name="name" type="string" displayName="Name" default=""/>
<property name="dateformat" type="tizen.datetimepicker@dateformat" displayName="Date format" default="" initValue="MM/dd/yyyy"
tooltip="Sets the date format"/>
<property name="timeformat" type="tizen.datetimepicker@timeformat" displayName="Time format" default="" initValue="hh:mm tt"
tooltip="Sets the time format"/>
<property name="default" type="boolean" displayName="Use system date" default="true">
<condition name="disable-property" value="true" target="datevalue"/>
<condition name="disable-property" value="true" target="timevalue"/>
<condition name="change-property" value="false" target="datevalue" targetValue="%target%"/>
<condition name="change-property" value="false" target="timevalue" targetValue="%target%"/>
</property>
<property name="datevalue" type="date" displayName="Date" default=""
tooltip="Sets the picker date value"/>
<property name="timevalue" type="time" displayName="Time" default=""
toolitp="Sets the picker time value"/>
<property name="group-text" type="group-text" displayName="Value Style" default="">
<property name="font-family" type="font@family" displayName="Font Family" selector="#%id%+div span"/>
<property name="font-size" type="font@size" displayName="Font Size" selector="#%id%+div span"/>
<property name="font-weight" type="css-font-weight" displayName="Font Weight" selector="#%id%+div span"/>
<property name="font-style" type="css-font-style" displayName="Font Style" selector="#%id%+div span"/>
<property name="text-decoration" type="css-text-decoration" displayName="Text Decoration" selector="#%id%+div span"/>
<property name="color" type="css-color" displayName="Color" selector="#%id%+div span"/>
</property>
<event name="onchange" displayName="Change" eventType="event.defaultevent" />
<xsl-for-output xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="tizen.datetimepicker">
<input>
<xsl:attribute name="data-format">
<xsl:choose>
<xsl:when test="@type='date'">
<xsl:value-of select="@dateformat"/>
</xsl:when>
<xsl:when test="@type='time'">
<xsl:value-of select="@timeformat"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat(@dateformat, ' ', @timeformat)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="value">
<xsl:if test="@default = 'false' and @datevalue != '' and @timevalue != ''">
<xsl:value-of select="concat(@datevalue, ' ', @timevalue)"/>
</xsl:if>
</xsl:attribute>
<xsl:call-template name="print-part-id"/>
<xsl:apply-templates select="@id" mode="simple-property"/>
<xsl:apply-templates select="@type" mode="simple-property"/>
<xsl:apply-templates select="@name" mode="simple-property"/>
<xsl:apply-templates select="@value" mode="simple-property"/>
</input>
</xsl:template>
</xsl-for-output>
</widget>