Unable to select date less than January 1, 1970

Hi Everyone,

I am unable to select date less than January 1, 1970 in ODK date widget,
using this configuration:

1997-01-01

Respondent Date of Birth Select Respondent Date of Birth

Using Huawei Mediapad 10 Link, when same form was loaded on different
device, dates below 1970 were selectable.

I guess that's device specific issue, but can something be done about it?

Regards,
Ayub

Are you sure the date was correctly set on the device? Because if not your constraint might just be doing exactly its job!

Yes, date was correctly set at 1997-01-01 when the date widget first loads
up. Even if I don't give any pre-fixed date e.g. I still cannot
select below 1970.

Any thoughts?

··· On Friday, September 12, 2014 12:29:02 AM UTC+5, francisv...@gmail.com wrote: > > Are you sure the date was correctly set on the device? Because if not your > constraint might just be doing exactly its job! >

Created an issue for this:
http://code.google.com/p/opendatakit/issues/detail?id=1062

This is a known issue described here:

And, of course, Google has done nothing
http://code.google.com/p/android/issues/detail?id=23481&thanks=23481&ts=1324675034

Here's more:


http://developer.android.com/reference/android/widget/DatePicker.html

··· ------------- The described work-around doesn't work as-is for us because we dynamically create the DatePicker object.

But we hack the Date Picker already to show and hide the day and month
spinners, so perhaps we can do something similar to coerce it to apply sane
start/end date limits?

On Thu, Sep 11, 2014 at 12:50 PM, Ayub nrspaggregate@gmail.com wrote:

Yes, date was correctly set at 1997-01-01 when the date widget first
loads up. Even if I don't give any pre-fixed date e.g. I still
cannot select below 1970.

Any thoughts?

On Friday, September 12, 2014 12:29:02 AM UTC+5, francisv...@gmail.com wrote:

Are you sure the date was correctly set on the device? Because if not
your constraint might just be doing exactly its job!

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

Is it possible to make certain modifications to date widget in ODK Collect
i.e.
(http://kevsaidwhat.blogspot.com/2011/10/fun-with-android-datepicker-and-1970.html)

android:startYear="1900"

And make it work?

··· On Friday, September 12, 2014 1:29:31 AM UTC+5, Mitch Sundt wrote: > > Created an issue for this: > http://code.google.com/p/opendatakit/issues/detail?id=1062 > > This is a known issue described here: > > > http://stackoverflow.com/questions/8620781/datepickerdialog-incorrectly-enforcing-a-minimum-date-of-jan-1-1970 > > And, of course, Google has done nothing > http://code.google.com/p/android/issues/detail?id=23481&thanks=23481&ts=1324675034 > > Here's more: > http://kevsaidwhat.blogspot.com/2011/10/fun-with-android-datepicker-and-1970.html > > > ------------- > The described work-around doesn't work as-is for us because we dynamically > create the DatePicker object. > > But we hack the Date Picker already to show and hide the day and month > spinners, so perhaps we can do something similar to coerce it to apply sane > start/end date limits? > > > On Thu, Sep 11, 2014 at 12:50 PM, Ayub <nrspag...@gmail.com > wrote: > >> Yes, date was correctly set at 1997-01-01 when the date widget first >> loads up. Even if I don't give any pre-fixed date e.g. I >> still cannot select below 1970. >> >> Any thoughts? >> >> On Friday, September 12, 2014 12:29:02 AM UTC+5, francisv...@gmail.com wrote: >>> >>> Are you sure the date was correctly set on the device? Because if not >>> your constraint might just be doing exactly its job! >>> >> -- >> -- >> Post: opend...@googlegroups.com >> Unsubscribe: opendatakit...@googlegroups.com >> Options: http://groups.google.com/group/opendatakit?hl=en >> >> --- >> You received this message because you are subscribed to the Google Groups >> "ODK Community" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to opendatakit...@googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Mitch Sundt > Software Engineer > University of Washington > mitche...@gmail.com >

It is more complicated than that -- editing an XML description to add these
attributes doesn't work -- we don't have an XML description.

Everything is currently done in the Java code, and there is no simple
programmatic way to set these values.

So there is some code to write, either to change DateWidget to use an XML
description file for its display, or to find a way to set these values in a
more clever / invasive manner.

In any case, the change can be done, it is just not a two-line edit.

Mitch

··· On Thu, Sep 11, 2014 at 1:37 PM, Ayub wrote:

Is it possible to make certain modifications to date widget in ODK Collect
i.e. (
http://kevsaidwhat.blogspot.com/2011/10/fun-with-android-datepicker-and-1970.html
)

android:startYear="1900"

And make it work?

On Friday, September 12, 2014 1:29:31 AM UTC+5, Mitch Sundt wrote:

Created an issue for this: http://code.google.com/p/
opendatakit/issues/detail?id=1062

This is a known issue described here:

http://stackoverflow.com/questions/8620781/datepickerdialog-incorrectly-
enforcing-a-minimum-date-of-jan-1-1970

And, of course, Google has done nothing http://code.google.com/p/
android/issues/detail?id=23481&thanks=23481&ts=1324675034

Here's more: http://kevsaidwhat.blogspot.com/2011/10/fun-with-android-
datepicker-and-1970.html
http://developer.android.com/reference/android/widget/DatePicker.html


The described work-around doesn't work as-is for us because we
dynamically create the DatePicker object.

But we hack the Date Picker already to show and hide the day and month
spinners, so perhaps we can do something similar to coerce it to apply sane
start/end date limits?

On Thu, Sep 11, 2014 at 12:50 PM, Ayub nrspag...@gmail.com wrote:

Yes, date was correctly set at 1997-01-01 when the date widget first
loads up. Even if I don't give any pre-fixed date e.g. I
still cannot select below 1970.

Any thoughts?

On Friday, September 12, 2014 12:29:02 AM UTC+5, francisv...@gmail.com wrote:

Are you sure the date was correctly set on the device? Because if not
your constraint might just be doing exactly its job!

--

Post: opend...@googlegroups.com
Unsubscribe: opendatakit...@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google
Groups "ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to opendatakit...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitche...@gmail.com

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

Mitch,

I guess I would go with a work around for the date widget for the time
being (string inputs, year, month), thanks for the detailed input on this
matter.
.
Ayub