Questions tagged [datefield]
307 questions
2
votes
2 answers
Storing DateTime field in lucene document
What is the best way to add datefield to a document (i just need YYYYMMDD)
Whats the best way to query against datefield
Im creating the datefield as the following
newDoc.Add(new Field("newsdate", "", Field.Store.YES,…

Ehsan
- 1,662
- 6
- 28
- 49
2
votes
2 answers
How to compare "peewee.DateField" with "datatime.date"?
I wrote the below program to fetch some rows of my database that contain information about the users whom born after 22-Jan-1963:
import datetime as dt
import peewee as pw
db = pw.SqliteDatabase('people.db')
class Person(pw.Model):
name =…

Ebrahim Ghasemi
- 5,850
- 10
- 52
- 113
2
votes
2 answers
Django / haystack - faceting based only on the year element of a DateField
Say I have the following model in a Django implementation:
class Broadcast(models.Model):
broadcast_date = models.DateField()
...
In my haystack/Solr-driven search results, I'd like to be able to facet by solely the year of broadcast, not…

Walker
- 423
- 3
- 8
2
votes
1 answer
ASP.NET MVC5 stores date in wrong format
last days I have a quite hard time to convince MVC5 project to work with dates as I would like to. After intensive googling I've tried numerous attepmts to make it work properly, but without success.
Here is the problem:
I need to display and edit…

Emil
- 306
- 5
- 16
2
votes
2 answers
Django form DateField initial value not updating in Apache
I have a Django form that includes a DateInput like this:
Fecha = forms.DateField(widget=DateInput(format = '%Y-%m-%d'),initial=(date.today() - timedelta(1)))
The idea is that every time you access the template that contains the form, it…

user3851205
- 75
- 1
- 8
2
votes
2 answers
Vaadin converter for java.sql.Timestamp
I am working with PostgreSQL database and timestamp columns have class java.sql.Timestamp. Even if this class extends java.util.Date, when I edit PopupDateFiels, I obtain error
Unable to convert value of type java.util.Date to model type class…

Hink
- 1,054
- 1
- 15
- 31
2
votes
1 answer
Text will not align left of datefield box
This should not be difficult at all... All I want is for the datefield box to align on the right side of my text (Date of Purchase). For some reason it will only align underneath the text or I can get the text to align on the right of the datefield…
user3585198
2
votes
2 answers
Firebird Data Type column field is not correct
I'm trying to extract the structure of a table of Firebird 1.5.
I managed to grab the data but there is a field that shows how IBExpert numeric and my select shows double.
The field is TR_VALOR. SQL return decimal and IBExpert DDL numeric.
Return…

mtsys
- 249
- 1
- 4
- 15
2
votes
3 answers
Change first-day-of-week for a Vaadin DateField or InlineDateField
How can I change the first day of week in the Vaadin calendar widgets, DateField & InlineDateField? For example, in the screen shot above, the week begins on a Sunday but I want Monday.
I know those widgets respect the Locale, and adjusts…

Basil Bourque
- 303,325
- 100
- 852
- 1,154
2
votes
3 answers
Can I display both (and only) month and year in a date_select helper tag?
I have a form with a date attribute.
Right now I'm using f.date_select :begin_date, discard_day: true but that displays month and year in a each own's select menu respectively.
Is it possible to have both month and year displayed in the same…

Fellow Stranger
- 32,129
- 35
- 168
- 232
2
votes
1 answer
Extjs datefields from to or start end date validations
This is a extjs mixin to validate fromdate todate or start end dates in a form.
here's the mixin.. (core code was taken from sencha forum :))
Ext.define("AMShiva.mixin.DateRangeValidator", {
timerange: function (val, field) {
///…

kdaShivantha
- 337
- 5
- 10
2
votes
2 answers
Get months from datefield in django
If I have a Datefield in django model, how can I get all possible months values from model objects?
so if I have object1 with date = 22.01.2013 and object2 with date = 23.05.2013, I need to get list of months [01, 05] or [1, 5]

user1931780
- 446
- 1
- 6
- 17
2
votes
3 answers
Native Android DatePicker with JavaScript
I am currently building a web based application and would like to use the native Android date picker for a field. I have looked into using PhoneGap but it seems to be more than I need for my project. Is there anyway to invoke the date picker field…

atxpunkrock
- 504
- 8
- 20
1
vote
2 answers
Django's loaddata giving ValidationError on valid date
I'm trying to use fixtures in Django to provide some initial data to one of my projects. The model that I want to provide this data to has a DateField named 'added'. So in the JSON file that contains my fixture, I included the following…

user1136324
- 203
- 3
- 10
1
vote
2 answers
ExtJS DateField using datetime format
var todate = new Ext.form.DateField({
format: 'd/m/Y',
fieldLabel: '',
id: 'txtExpireDate',
name: 'txtExpireDate',
width: 150,
allowBlank: false,
value: '',
renderTo: 'divDateExpire'
…

KCuncle
- 21
- 1
- 2
- 3