[Help] how to get the calendar value #1525
-
Help WantedHi, I am trying to the calendar selected value through Jquery, but I got the error "underfined", it is quick a basic operation, please advise. Test case,Pleaes check it in JS fiddle. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
You have to use If you want to use jQuery Example with Example with jQuery |
Beta Was this translation helpful? Give feedback.
-
The value is also available as a parameter for the |
Beta Was this translation helpful? Give feedback.
You have to use
calendar('get date')
to get the selected date (https://fomantic-ui.com/modules/calendar.html#/usage).If you want to use jQuery
val()
, you have to select from the actual input field, not the DOM element that invoke thecalendar
module.Example with
calendar('get date')
method (https://jsfiddle.net/nqb0zvk2/).Example with jQuery
val()
method (https://jsfiddle.net/nqb0zvk2/1/).