Custom Date Selection with HTML & JS

Hi emre!

This date picker was exactly what I was looking for and I’ve been trying to implement this, but I have run into a problem where the date picker pops-up, but the {:Delivery Date} does not seem to get a value from the date picker.

Here is my setup:
image

image

image

image

image

I put this Popup action here to see what {:Delivery Date} is, but it shows up as…nothing.(I’ll show that later on)


When Future Date is clicked the popup browser works fine.

image

and then the ticket tag is not updated…

Here is the popup:
image

Meaning, the {:Delivery Date} is null…
I am unsure of where to proceed from here…

Thank you in advance, any help is appreciated!

It’s null because you changed it. You used Pickup Date instead of Delivery Date. Try {:Pickup Date}

It’s very important not to change parts of a tutorial unless your sure what you are doing.

Hmm. I did try {:Pickup Date} as well.
(As well as:
{SETTING:Pickup Date}
{:Pickup Date}
{LOCAL SETTING:Pickup Date}
{SETTING:Delivery Date}
{:Delivery Date}
{LOCAL SETTING:Delivery Date})

I had assumed that because

window.external.SetLocalSettingValue('Delivery Date',this.getMoment().format('DD MM YYYY'))

in the deliverdate.zip was still set as Delivery Date, so I had kept it the same.

Does not work in version 5.3.0

Ok I had time to read the entire tutorial now I understand. I would have to test this on windows 10 with 5.3.0 to be sure its still possible. This is an older tutorial and a lot has changed specifically our libraries.

Ah, the answer that I had sort of thought was…but did not want to accept.

@Jesse Thank you for your help!

Also in continuation, is there something similar to this that I would be able to implement?

@ilyas how do you know for sure its 5.3.0 that does not work with it? What feature is not working?

I think I will build this now and see if I can make it work.

Local Setting and global setting

Those features work. Do you mean specifically the window.external.SetLocalSettingValue call?

{:Delivery Date} {GLOBAL SETTING:Delivery Date} {LOCAL SETTING:Delivery Date} not working

Those are powered by the jscript. Settings work in sambapos 5.3.0 Are you saying the javascript hook is not working? I am about to test this tutorial myself.

I select the date but it is not saved locally

It probably has to do with new chromium engine. @VehbiEmiroglu maybe can look at that.

I can confirm that the JS is not working in the browser to pass the localsetting.

OK we will control this.

2 Likes

I woud like to use this, but doesn’t seem to work.

Wait for an update we will fix it.

Didn’t fix on new version 5.3.2

Hi @Jesse

I saw it here and I wanted to use it, but unfortunately it didn’t work. I wonder if there is any progress on this issue ?