alumuko / vanilla-datetimerange-picker

A JavaScript component that is a date & time range picker, no need to build, no dependencies except Moment.js, that is based on Dan Grossman's bootstrap-daterangepicker.
MIT License
148 stars 17 forks source link

Update Hidden Custom Attribute In Element #12

Open benlbit opened 1 year ago

benlbit commented 1 year ago

I am trying to update an attribute attached to the element triggering the DateRangePicker.

e.g.

I am trying to update the attribute(s) within the callback function

function (start, end) { this.element.hstartvalue = start.format(); this.element.hendvalue = end.format(); }

Problem is the DOM isn't being updated by the callback.

Is there a proper way to access the element of which the DateRangePicker is attached?

I need the callback function to specifically update the node because I have a large number of DateRangePickers attached to a large number of text inputs contained in a list.