Questions tagged [timefield]
47 questions
19
votes
2 answers
TimeField format in Django template
I'm writing an application in Django and using several TimeFields in a model. I only want to work with the time format hh:mm (not hh:mm:ss or hh p.m./a.m. or other things).
I have set the django setting TIME_FORMAT = 'H:i' and USE_L10N = False…

user989863
- 223
- 1
- 2
- 6
10
votes
2 answers
Django Forms: TimeField Validation
I feel like I'm missing something obvious here. I have a Django form with a TimeField on it. I want to be able to allow times like "10:30AM", but I cannot get it to accept that input format or to use the "%P" format (which has a note attached saying…

Tom
- 22,301
- 5
- 63
- 96
6
votes
4 answers
set input to AM PM in django timefield
i want to allow users to be able to choose between am and pm with my django timefield
Currently if I enter:
11:00 AM
, i get a form error: "Enter a valid time."
If I enter:
11:00
the form validates with no problem.
I also tried:
class…

Atma
- 29,141
- 56
- 198
- 299
5
votes
2 answers
Django rest framework timefield input format
After hours of searching, I found many posts that are related but wasn't able to help.
What I want to do is input eg: 10:30 AM into the TimeField.
In the django rest framework API on the browser, it is using this 10:30 AM format ('%I:%M %p').
But…

Jin Nii Sama
- 707
- 1
- 16
- 33
4
votes
4 answers
Extjs: (TimeField) reset minValue and maxValue
I have an ExtJS TimeField where I use the setMinValue(...) and setMaxValue(...) to only show the valid time-elements to the user. This works just fine, but how do I reset the minValue and maxValue so that the user can see all the time-elements…

Chau
- 5,540
- 9
- 65
- 95
4
votes
2 answers
How to keep the format of ExtJS timefield in 24hours
I am trying to create a timefield combo box with extJS. I have done this successfully but now I have a problem when I get the value that I select in the combo box.
First the code for making the timefield:
items :[{
fieldLabel: 'Start Time',
…

user1919
- 3,818
- 17
- 62
- 97
3
votes
1 answer
Force HTML to show time with seconds from a Python model object
Please excuse my newbie status to python and web applications.
For a few hours, I simply cannot get this to work properly.
All I want to do, is have the table items display the time with seconds.
It prints correctly from within views.py, but seems…

Clauds
- 31
- 1
3
votes
2 answers
Django - TimeField difference
I would like to compare two time fields to get the difference in hours and minutes.
class Labor(models.Model):
id = models.AutoField(primary_key=True)
start_hour = models.TimeField(null=True)
end_hour = models.TimeField(null=True)
…

WitnessTruth
- 539
- 2
- 9
- 27
3
votes
0 answers
JavaFX TimeTextField
Base Article:
[https://community.oracle.com/thread/2552039?start=0&tstart=0][1]
I extend the solution from the oracle community with the event filters in the constructor for a better user ergonomics.
The JavaFX TimeTextField provides all functions…

Wolfgang Schele
- 41
- 1
- 3
3
votes
1 answer
Formatting TimeField
I'm overriding my model admin form in order to change the format of the displayed time of a TimeField field:
class myTimeForm(forms.ModelForm):
start_time = forms.TimeField(widget=forms.TimeInput(format='%H:%M'))
class Meta:
model =…

jul
- 36,404
- 64
- 191
- 318
2
votes
1 answer
Time-Field: not configured in Kibana
It can happen you have "Time-field: not configured" in kibana when you hit settings on Discover tag.
How to avoid it?

Francisco López-Sancho
- 3,227
- 29
- 22
1
vote
1 answer
round time using wtforms in python
I'm using wtforms in python, and everything is working fine, but I want to round the TimeFiled to hour only and keep the minutes in 00. For example 14:00, 15:00, so the user can choose only hour, not minutes.
My forms.py:
class…

PabloM
- 29
- 6
1
vote
1 answer
ExtJS timefield 24 hour format picker
I'm using ExtJS 7.3.1 (modern) and I have a problem with the timefield picker. I can't find a solution to let the user choose directly in the 24hour format without switch between AM and PM option ... is it possible?
In the visualization no problem,…

Studio Centro srl
- 13
- 3
1
vote
2 answers
Django: How to limit TimeField to hours and minutes only (comparison issue)
I'm developping a web api using django, I have a TimeField that stores hours:minutes:seconds, since it will be compared to a hours:minutes (without seconds) coming from the mobile app, the comparison will always fail.
here is a comparison without…
user11232156
1
vote
0 answers
Django - updating TimeField in forms/formsets returns value without microseconds
I have problem with updating TimeField in my models - when I want to edit objects using forms/formsets the input field on my site is always cutting microseconds.
I made ex. class with TimeField:
class Participant(models.Model):
surname =…

george
- 15
- 4