]> saetta.ns0.it Git - zakform/tests/commitdiff
Tested ZakFormValidatorCompareDate.
authorAndrea Zagli <azagli@libero.it>
Sat, 2 Jan 2016 11:11:07 +0000 (12:11 +0100)
committerAndrea Zagli <azagli@libero.it>
Sat, 2 Jan 2016 11:11:07 +0000 (12:11 +0100)
data/zakformtests/gui/main.ui
data/zakformtests/xml/main.xml

index fff812b9ce2b425e442efa17ff879b0962f22f92..43d6b48201127bc3bbd85982c273494be9f34346 100644 (file)
                 <property name="top_attach">0</property>
               </packing>
             </child>
+            <child>
+              <object class="GtkLabel" id="label6">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">From date</property>
+                <property name="xalign">0</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">9</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="label7">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">To date</property>
+                <property name="xalign">0</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">10</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkEntry" id="entry2">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="max_length">10</property>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="top_attach">9</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkEntry" id="entry3">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="max_length">10</property>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="top_attach">10</property>
+              </packing>
+            </child>
           </object>
           <packing>
             <property name="expand">False</property>
index 962b81119a80923545c8211c893434c65a865a5a..c9a5b580ae2b56ebdbf89a2cdbe12d224a4a14ad 100644 (file)
@@ -103,4 +103,24 @@ and                                         some            tabs
        <label>label5</label>
   </element>
 
+    <element type="zak_form_gtk_form_element_entry">
+       <name>date_from</name>
+       <type>datetime</type>
+       <format>%d/%m/%Y</format>
+       <widget>entry2</widget>
+       <label>label6</label>
+       <validator type="zak_form_element_validator_date">%d/%m/%Y</validator>
+  </element>
+
+    <element type="zak_form_gtk_form_element_entry">
+       <name>date_to</name>
+       <type>datetime</type>
+       <format>%d/%m/%Y</format>
+       <widget>entry3</widget>
+       <label>label7</label>
+       <validator type="zak_form_element_validator_date">%d/%m/%Y</validator>
+  </element>
+
+  <validator type="zak_form_validator_compare_date" type_comp="lt" element1="date_from" format1="%d/%m/%Y" element2="date_to" format2="%d/%m/%Y"></validator>
+
 </zakform>