melohagan / budibase-component-kasper-date-picker

Date picker with text input with options to set format, locale, show/hide calendar. Adapted from the Kasper date picker.
11 stars 6 forks source link

Javascript does not produce the intended result #11

Closed kzkondo closed 1 year ago

kzkondo commented 1 year ago

Checklist

Hosting

Describe the bug Javascript does not produce the intended result

To Reproduce Write the following java script in the default value. state.date is the value obtained using update state on another page. The calendar picker gives the intended result, but the kasper-date-picker does not.

let date = $("State.date"); if(date){ date = helpers.date($("State.date"),'YYYY/MM/DD') } else{ date = helpers.date(new Date,'YYYY/MM/DD') } return date;

Desktop (please complete the following information):

melohagan commented 1 year ago

Hi @kzkondo

This line of code: date = helpers.date(new Date,'YYYY/MM/DD') doesn't look correct, would it not be new Date()?

Closing for now. If you would like to re-open the issue, please provide some screenshots and the direct correct code being used.