Day drop down box is selecting different day (one day lesser than the one mentioned in the "Input" section)d

Hi All,

I have a DOB field to be selected. Each section is a separate drop down box
(Month/Day/Year). In this Day is not getting selected correctly. If I pass say “18” it select “17”. Its is a “select Item” type. Can you please tell me how I can fix this issue?

Date of Birth* January 17 1957

Thanks
Jayashree

1 Like

Hi @jayashreedoraivelu,

Could you send some screenshots showing how you are using the Select Item activity?

Thanks!

Hi,

If the value minus one is always selected, can you try to add 1 to the value as the following?

img20220224-1

(Int32.Parse(strDayVariable)+1).ToString

Regards,

1 Like

Hi @jayashreedoraivelu,

If you entered directly with the value 18 and the item selected was not 18 (in this case it was 17), it is probably a bug on the website.

You can try Yoichi’s suggestion.

Another possible way to solve this without having to add one to the desired value, is to use a Inject JS Script activity. But, it would be more complex.

I will ask our developer to see if it is a bug in the website.

Tried Yoichi’s suggestion and I am getting invalid input format error message.

Thanks
Jayashree

1 Like

@jayashreedoraivelu

Have you tried “19”. Does it work?

If you have an Int32 variable which value is 18: (yourVariableName + 1).toString

If you have a String variable which value is “18”: (Convert.toInt32(yourVariableName) + 1).toString

If the order is Month->Day->Year value minus by 2. If I move around the order my selecting Month->Year->Day value minus by 1. Not sure how the change of order changes the behavior. Any input please…

Thanks
Jayashree

1 Like

@jayashreedoraivelu,

So, define an order and always follow it if it’s reliable.