Exemplo n.º 1
0
 def show_example_date_picker(self):
     if self.root.ids.date_picker_use_previous_date.active:
         pd = self.previous_date
         try:
             MDDatePicker(self.set_previous_date, pd.year, pd.month,
                          pd.day).open()
         except AttributeError:
             MDDatePicker(self.set_previous_date).open()
     else:
         MDDatePicker(self.set_previous_date).open()
Exemplo n.º 2
0
 def show_date_picker(self):
     # self.focus = False
     if self.count == 0:
         self.count += 1
         MDDatePicker(self.set_previous_date).open()
         # self.count -= 1
     else:
         return True
Exemplo n.º 3
0
    def show_date_picker(self, instance):
        if instance.focus:
            date = instance.text

            def set_previous_date(date):
                self.ids.task_date.text = str(date)
                try:
                    dialog.dismiss()
                except:
                    pass

            dialog = MDDatePicker(set_previous_date,
                                  firstweekday=calendar.SUNDAY,
                                  auto_dismiss=False)

            try:
                year, month, day = [int(i) for i in date.split('-')]
                dialog.set_date(year, month, day)
            except:
                pass
            finally:
                dialog.open()
Exemplo n.º 4
0
		def InsertDatePicker(btn):
			def Setrapdate(date_obj):
				# box.ids.insertrapdate.text = str(date_obj)
				self.selecteddate = str(date_obj)
			MDDatePicker(Setrapdate).open()
Exemplo n.º 5
0
 def show_datepicker(self, value):
     self.mywidget = self.ids[value]
     MDDatePicker(self.set_date).open()
Exemplo n.º 6
0
 def exports_date_pick(self):
     MDDatePicker(self.set_exports_date).open()
Exemplo n.º 7
0
 def imports_date_pick(self):
     MDDatePicker(self.set_imports_date).open()
Exemplo n.º 8
0
 def products_date_pick(self):
     MDDatePicker(self.set_products_date).open()
Exemplo n.º 9
0
 def on_release(self):
     value = datetime.datetime.strptime(self.value, '%Y-%m-%d').date()
     date_picker = MDDatePicker(self._set_value, year=value.year, month=value.month, day=value.day)
     date_picker.open()