Data picker: start date and end date return 0 or null

Hi, everyone,

I’m a beginner on Weweb,
I have a data picker in range mode, and I would like to send the dates to xano, except that the first thing that blocks me is that I receive either null values or “0” when testing with Weweb.

Any ideas?


2023-10-21 at 13-31-37

2023-10-21 at 13-44-39

I think you’re accessing the wrong variable.

Hi Broberto,

Thanks for your answer, I thought that too, but when I put the variable concerned, the test puts me “null”.

2023-10-21 at 14-26-35

I’m still convinced you’re using the wrong one. In the editor you’re showing [Data mission - value] and in the null example you’re showing something called [missionAvailabilityDate] maybe I’m not understanding the question?

In the missionAvailabilityDate you need to bind [Data mission - value] if you’re supposed to pass an object with start and end properties.

Edit: Okay, I checked it out and I think I know what’s going on. You actually need to make the object be like this

My theory is that you’re passing the wrong data form and Xano doesn’t recognize it maybe?

{
startDate: ...,
endDate: ...
}

now you indeed are sending the following

{
start: ...,
end: ...
}

to make this right, you need to go to BindJavascript (instead of Formula in the top left) → and build an object like this

return {
startDate: [Data mission - value].start,
endDate:  [Data mission - value].end
}

Edit two: or you can edit your Xano, to accept an object with only the start, end proprieties, not the startDate and endDate

I might try opening devtools, going to the networking tab, and finding the request being made to Xano. Take a look at what’s being sent. if the data looks good, you have a problem in how Xano is listening for the data. If the data looks bad, you have a problem in weweb preparing the data. This lets you cut your problem search space in half very quickly.

Hi Broberto,

Thanks for your advice, I tried with javascript.
The first recommended solution didn’t work.

I retrieved the end and start values from the picker and put them in the “MissionAvailabilityDate” object.
However, the object returns “null” for StartDate and EndDate again, whereas in the curency the values are correct.

it’s getting complicated

Hi Raydeck,
Thanks for the tip. I’d say the problem comes from Weweb, I’ve inspected the Network and it’s sending me “null” too.
I don’t have any new information, so I’ll show you my Xano too.


2023-10-22 at 03-05-12
2023-10-22 at 03-05-44
2023-10-22 at 03-06-01

I think you need to unwrap it from the missionAvailability… object, and send only the {startDate: … , endDate: …}

I think Xano is indeed expecting this format, ignore the time in it also, the point is, don’t wrap it again, just make an object with those two params.

In your example above you’re sending an object wrapped within an object

1 Like

Hi Broberto,

Thanks for your help, it’s finally working and I’m getting the data on Xano .

If you have any advice on how to make progress, I’m listening. As far as the formulas are concerned, I’m in a fix haha.

1 Like