(self, dt_type)
return date_form.clean(date_value)
Clean and parse datetime filter_value inputs.
Clean and parse datetime filter_value inputs.
Clean and parse datetime filter_value inputs .
def parse_datetime_fields(self, dt_type):
        """Clean and parse datetime filter_value inputs."""
        date_value = parser.parse(dt_type)
        date_form = forms.DateTimeField()

        if self.field_type == 'DateField':
            date_value = date_value.date()
            date_form = forms.DateField()
        if self.field_type == 'TimeField':
            date_value = date_value.time()
            date_form = forms.TimeField()

        return date_form.clean(date_value)
def parse_datetime_fields ( self , dt_type ) : date_value = parser . parse ( dt_type ) date_form = forms . DateTimeField ( ) if self . field_type == 'DateField' : date_value = date_value . date ( ) date_form = forms . DateField ( ) if self . field_type == 'TimeField' : date_value = date_value . time ( ) date_form = forms . TimeField ( ) return date_form . clean ( date_value )