You need to sign in to do that
Don't have an account?
hashir kp
how to pass a custom calendar in to input field of LWC
-----------html---------
<lightning-button onclick={getDateHijiri} label="Hijiri Calendar" variant="destructive" ></lightning-button>
<lightning-helptext class="slds-p-left_small" content="Click Here to see the Islamic/Hijiri Calendar"></lightning-helptext>
<br>
<br>
<div class="mydiv1" >{hijiriValue}</div>
<input id="hijrDate" type="text" placeholder="Click to pick a date...">
---------js-------------
getDateHijiri(){
var hval = $(this.template.querySelector('.mydiv1')).calendarsPicker({calendar: $.calendars.instance('islamic')});
hijiriValue = hval;
}
here iam using some Scripts in my LWC where i added in my Static resources.here iam able to show the calendar in div section but i need to show when input field is clicked and need to return the selected date in my input field.
so how can i achieve this requirement?
any help would be useful for me
<lightning-button onclick={getDateHijiri} label="Hijiri Calendar" variant="destructive" ></lightning-button>
<lightning-helptext class="slds-p-left_small" content="Click Here to see the Islamic/Hijiri Calendar"></lightning-helptext>
<br>
<br>
<div class="mydiv1" >{hijiriValue}</div>
<input id="hijrDate" type="text" placeholder="Click to pick a date...">
---------js-------------
getDateHijiri(){
var hval = $(this.template.querySelector('.mydiv1')).calendarsPicker({calendar: $.calendars.instance('islamic')});
hijiriValue = hval;
}
here iam using some Scripts in my LWC where i added in my Static resources.here iam able to show the calendar in div section but i need to show when input field is clicked and need to return the selected date in my input field.
so how can i achieve this requirement?
any help would be useful for me