Questions tagged [timefield]

47 questions
0
votes
1 answer

Django Logbook Timefield() subtraction for total time

i have been trying to figure how how do I do a simple subtraction between two time fields and show the total time on the admin page as well for confirmation before saving. example would be actual time of arrival - actual time of departure = total…
0
votes
1 answer

Getting an error when trying to set input_formats for Django TimeField

I am using the following model to represent a Class: class Class(models.Model): course = models.ForeignKey(Course, on_delete=models.CASCADE) day = models.CharField(max_length=10, choices=WEEK_DAYS) timing = models.TimeField(input_formats =…
chomprrr
  • 406
  • 4
  • 15
0
votes
2 answers

convert double to time in python

I have a TimeField() in my django models. I want to convert the sum of the record of this to hours. Here's the actual code in my view: hours_week_decimal = Timesheet.objects.filter(owner = request.user.pk, week =…
Yann Btd
  • 409
  • 2
  • 6
  • 18
0
votes
1 answer

django models timefield o min:sec format

How can I set TimeField format in django models to be [min:sec] like for an audio track? class Song(models.Model): title = models.CharField(max_length=128) duration = models.TimeField(null=True)
0
votes
1 answer

org.apache.wicket.extensions.yui.calendar.timefield how to use wicket

So I am trying to replace what was a text field to get time from my users with a TimeField (of the type mentioned in the title). I am running into all kinds of problems. Namely, that the TimeField, absolutely must be Timefield type, and doesn't…
SoftwareSavant
  • 9,467
  • 27
  • 121
  • 195
0
votes
1 answer

How to calculate Total Time in Java Vaadin TimeFiled, i.e seperate drop down for Hours and Seconds (HH:MM)?

if (tfTimeIn.getValue() != null && tfTimeOut.getValue() != null) { Long min1 = tfTimeOut.getMinutesValue(); Long min2 = tfTimeIn.getMinutesValue(); Long hr1 = tfTimeOut.getHoursValue(); Long hr2 =…
user5519797
0
votes
1 answer

ExtJS not able to set value for timefield component

I've been trying to find an approach on how to fix the issue I have, but I could not find it in Google nor S.O, that's why I'm posting this question. I have two components of type: timefield that are represented in this piece of code: { …
Marcelo Tataje
  • 3,849
  • 1
  • 26
  • 51
0
votes
1 answer

Django : duration in time

Currently, I use django 1.4.8 and I have in my model the following two fields: class Event(models.Model): ... start = models.DateTimeField(_(u"départ")) end = models.DateTimeField(_('fin')) I tried to add a field indicating instead the…
Patrice
  • 209
  • 1
  • 4
  • 15
0
votes
2 answers

Extjs 4.1 timefield returning 2008 as the year

I have created a simple application using extjs timefield. Here is the code & fiddle: Ext.create('Ext.form.Panel', { title: 'Time Card', width: 300, bodyPadding: 10, renderTo: Ext.getBody(), items: [{ xtype: 'timefield', …
SharpCoder
  • 18,279
  • 43
  • 153
  • 249
0
votes
1 answer

How to print a TimeField - TypeError: not all arguments converted during string formatting

This is my model: class Meeting(models.Model): start_time = models.TimeField(null=True) def __unicode__(self): return u'%s' % (str(self.start_time)) When I do Meeting.objects.all() I get TypeError: not all arguments converted during string…
user1420563
  • 195
  • 1
  • 12
0
votes
1 answer

Extjs: how to send empty timefield?

I'm developing Extjs form and have to send all field, also empty fields. It works for all types of fields only timefield is not send. Here an example with datefield and timefield. Why do they behavior differently? Which config should I use to send…
Annie W.
  • 328
  • 4
  • 22
0
votes
1 answer

add 15 minutes to timefield

I use two timefields. One is the starttime and the other the endtime. When i select a time in the starttime i load this value into the endtime: { xtype: 'timefield', flex: 1, margins: '10', maxHeight: 25, maxWidth: 100, fieldLabel: '', labelAlign:…
Rick Weller
  • 1,258
  • 9
  • 35
  • 54
0
votes
1 answer

Filling DateField and TimeField, according to a format, with incoming data

I have a datefield and a timefield in my ExtJS form and I have to fill them with data sent from the server. The server sends data in the following format (via Ajax): date=2013-05-10T00:00:00.000+04:00,time=1970-01-01T00:30:00.000+03:00 How do I get…
noncom
  • 4,962
  • 3
  • 42
  • 70
0
votes
1 answer

TimeField format in Django

I am trying to use a TimeField model which only consists of MM:SS.xx (ie 43:31.75) format. Is it possible to format a regular Python time object like this? Thanks.
0
votes
1 answer

set mintime and maxtime of timefield dynamically in ext.net

I am working with EXT.NET 1.2 I want to set minTime and maxTime from codebehind(from cs Page). I ha dwritten following code but not working that code.. is their any mistake or is ther any another method(through Javascript)?? Code tmFrom.Increment =…
Smily
  • 2,646
  • 4
  • 23
  • 31