Questions tagged [datefield]
307 questions
0
votes
1 answer
Why DateField data type is different in model method and view?
In Django I have some model let's say:
class Learner(models.Model):
birth_date = models.DateField(null=True, blank=True)
def is_of_age(self):
logging.debug(type(self.birth_date))
.....
and view, let's say:
def overview(request):
…

Michał Werner
- 285
- 4
- 10
0
votes
0 answers
Django's clean DateField failing for no reason
Every few requests people would get errors while using the form on my site
on the DateField, even though it seems their input is fine
birthday = forms.DateField(widget=MyDateInput(attrs={ 'min': (datetime.now()-…

uri.lazar
- 329
- 3
- 10
0
votes
1 answer
How to Remove Hover effect of Today button in GXT DatePicker
I'm using the DateField in Gxt 3.1.1, please help me how can I customize/remove the hover effect when the mouse hovered on 'Today' button as in the example.
I've tried to write a wrapper of DatePickerCustom as below to access todayBtn behavior, …

Varun Tamiri
- 11
- 2
0
votes
1 answer
"Enter a valid date" Error in Django Forms DateField
I know there are a lot of threads alredy talking about this but there is none that remotely solved my problem. This is really weird because everything has been done how it's meant to be done.
Here is my forms.py:
from django import forms
from…

konoufo
- 427
- 5
- 15
0
votes
1 answer
set the Django's model to a specific day in a month?
I have a monthly report model and I want to set it to a specific date (cycle).
This is my model:
class MonthlyReport(m.Model):
month = m.DateField() <= set to a specific day in a month
worker = m.ForeignKey('auth.User')
total =…

Ravit
- 1,482
- 3
- 18
- 24
0
votes
0 answers
Vaadin how to bind a FieldGroup with a DataField
I am binding some text fields with data from a table and everything seems OK!
But in two particular fields I need to use dates and so I altered the corresponding TextFields to DateFields so that it is more convenient to user to change dates.
The…

kostia
- 324
- 5
- 18
0
votes
1 answer
extjs5 : How to disable all dates after today's date
I am using extjs datefield
Ext.create('Ext.form.Panel', {
renderTo: Ext.getBody(),
width: 300,
items: [{
xtype: 'datefield',
fieldLabel: 'From',
maxValue: new Date()
}, {
xtype: 'datefield',
…

user216905
- 31
- 1
- 7
0
votes
3 answers
SQL field add date change format to YYYYMMDD
I have one field for date contains year and months. Field name new_TarikhSebenarTamatPengajian. Exmaple of data 199110 (Format:YYYYMM). I want to add date to set a new format require are (YYYYMMDD).
For the available data Can I add date follow end…

MUHD MAN
- 55
- 1
- 10
0
votes
1 answer
Date Field Mask Not Working
This is very frustrating. I am using cfinput datefield and mask="MM/DD/YYYY" and its not working. If it is cfinput text and mask="MM/DD/YYYY" it works perfect. I do not want to only have a textbox though I would like to keep the calendar that the…
user4143057
0
votes
1 answer
Subtracting days in new Date() in a view
I got this piece of code:
xtype: 'datefield',
editable: false,
itemId: 'start-date-field',
fieldLabel: 'Från',
labelWidth: 50,
format: 'Y-m-d',
value: new Date(),
disabled: true
and I'm trying to subtract some days…

President Camacho
- 1,860
- 6
- 27
- 44
0
votes
1 answer
smartgwt listgrid datefield return long date value...?
Listgrid in my smartgwt project have some dateitem field which allow user to select date from calender for particular row.
When user select it show project in related textfield(in cell) mm/dd/yyyy.
When I try to fetch the value of that cell it…

Manish Jain
- 842
- 1
- 11
- 29
0
votes
1 answer
Django. Check if its another day
How can I check that, there is another day from my date variable? I mean, how to write if statement between my DateField, and actuall date to check is is another day (for example: last was 26 July, now is 27, so i want to show alert box).

ziomagic
- 93
- 1
- 9
0
votes
1 answer
Drupal 7: How do I change the input format of a Date after the field was created?
I created a "Date" field and its format defaulted to MM/DD/YYYY (English). I changed the Date settings in "/admin/config/regional/date-time" to use DD/MM/YYYY and added another "Date" field, which uses that format. Now I have two fields with two…

olvlvl
- 2,396
- 1
- 22
- 22
0
votes
2 answers
What is the difference between Flex mx:DateField disabledRanges = "" and selectableRange = ""?
I Want a flex date field with particular selectable range only.
I could there are similar properties of mx:DateField to restrict the selectable date range. that are
and

Sasikumar Murugesan
- 4,412
- 10
- 51
- 74
0
votes
1 answer
Converting value of DateField in vaadin
I'm working with the Vaadin Framework at the moment. I want to convert the string in my DateField to Date. So I have two classes, one is the view and the other should contain the values which I save with data binding.
This is the DateField in the…

hoedding
- 257
- 1
- 4
- 14