Thanks for providing this widget, this is really useful. I am using it for my Nepal project to enter the respondent's DOB. Then I realized that this widget cannot take a date before 1951.
Please suggest how to tackle it.
Another question I need to use a constraint on this DOB, i.e. person should be between 15 to 69 years old otherwise it will give a warning message.
I am working for the World Health Organization NCD STEPs project. In this, we cover the population which is between 15-69 years old as on date. Therefore, if we are going to start the survey in 2019 then min age is required 1950.
The second solution provided worked well. Thanks.
Naveen
FYI, a quick look at the code indicates that the start date for this calendar - as presently implemented - appears to be April 13 1950:
* Magic numbers:
* 86400000 <- the number of miliseconds in a day
* 2007 <- The year (BS) whose first day is our Bikram Sambat Epoch (BSE)
* -622359900000 <- Date.parse('1950-4-13') = unix timestamp of BSE
I know that doesn't entirely solve your problem, but maybe it buys you 'a few months'...?
I might also suggest following the referenced github issue directly, as @Grzesiek2010 may not necessarily be the one making the code changes required (@alxndrsn?)
@Naveen_Agarwal We are limited by the upstream library we depend on. When it's fixed there, we'll be able to pull it in Collect and add it to the next release. You can follow the issue at https://github.com/medic/bikram-sambat/issues/8. If we can get that fix by Jan 16th, it'll likely ship by end of Jan.
I understand that this might not work with your schedule, but I hope you understand that these kinds of changes are driven by volunteers. What would help us move quickly is if you can find/fund contributors who can make the changes and help us ship them. If that isn't possible, we ask for your patience.
As a short term fix, you can ask a question if the person is older than what the widget currently supports and have the date manually entered in a text box.
ODK Collect v1.19 Beta should now support dates before 1951. Please try it and make sure it works for you, @Naveen_Agarwal. If all goes well, the release will be out on Feb 3rd.