@Teodor. Thanks for your answer. I’m impressed by the versatility of Wappler. I was not expecting all this to be possible. However, I doubt that I could make this work by myself. Is there a way to hire someone from wappler for help?
@Teodor@Hyperbytes Thanks, that’s good to know. I’m trying all sorts of things to figure out how to make a selct option availably only when the difference between of two date inputs are more than a year. Do you know how to calculate the difference between to date inputs?
But how do I even select two values (inp_StartDate.value and inp_EndDate.value) to start with? Should I use “Field”, “Expression” or “Template”? Can I write a javascript expression myself (I’m using moment.js) or can only use those in Wappler?
I had to set “12” to a number. Now it works, but in reverse. I want the select option to be abled (not disabled) when the condition is true. How can I fix that?
I got the logic to work but I was hoping to have the select option visable, but disabled until my expression was true. Is that possible, or can I only show/hide the select option this way?
I think that’s how I did it, exept I don’t know where you got the part “dmx-bind:disabled=” from? The expression still works in reverse though; the select option gets disabled when the difference is more than 12 months. I want it to be abled when the difference i more than 12 months.
Thank you very much! It works when inp_StartDate and inp_EndDate are set. Do you know how have the select option disabled from start (i.e. even when ther are not set)? I tried this but it did not work: inp_StartDate.value.monthsUntil(inp_EndDate.value) > 12 || (inp_StartDate.value == "undefined").