Bikram Sambat (Nepali) date widget

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.

Please advise on this as well.
Thanks in advance.

Hi @Naveen_Agarwal

Thanks for testing the widget and letting us know. We use an external project which doesn't support older dates.
I opened an issue:

What min date do you need?

When it comes to the second question here is a sample which should help: dob_age.xlsx (6.5 KB)

@Grzesiek2010 Thanks for your support and response.

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.

@Grzesiek2010 Any update on this, as very soon we need to go in the field.

@Naveen_Agarwal It's the Christmas holiday so it's unlikely there will be any movement on this issue until early January.

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?)

@Xiphware Thanks, but difficult for me to update the code and use it.

@yanokwa Hi, Appreciate if someone can help me on this. Going Nepal next week to train the enumerators.

@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 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.


Thanks. One of my friend Gopal Aroa is working on this as volunteer. Hope it will get resolve soon.

1 Like

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.

1 Like