Is it possible to display Datepicker as a monthly calendar view (instead of clicking on it to open)
Also, can i highlight multiple dates with background css in that Datepicker ?
Is it possible to display Datepicker as a monthly calendar view (instead of clicking on it to open)
Also, can i highlight multiple dates with background css in that Datepicker ?
Hi Sunny,
Everything that jQuery Datepicker Widget API is supported you can implement: http://api.jqueryui.com/datepicker/
Thanks .. That helps !!
Hi there,
i've read other threads about getting datepickervalues by js but some of them are a bit old and i'm not sure if some things have changed.
What i want to do is get the datepicker current date via js:
this is the jquery method var currentDate = $( ".selector" ).datepicker( "getDate" );
I tried this on page load:
var date = Appery("date").datepicker("getDate"); ("date" is the name of datepicker element)
alert(date); other things i tried: alert(date.val());
Testing wasn't successful, the page isnt displayed in the tester.
After that, i want to use the variable date as an extension for a localstoragevariable. So far this worked, when i use the builder to set a localstorage variable with date on valuechange for the datepickerelement and use this code to add the extension:
var sleep = Appery('msm_sleep'); //mobileselectmenu for the value
var date = localStorage.getItem('date'); //the date saved to localstorage
localStorage.setItem('sleepscore' +date, sleep.val()); //the key (with date added) and value.
Do you have an idea to complete this without setting the date with the builder but instead by js?
something like
var setdate = Appery("date").datepicker("getDate"); //get date
localstorage.setItem('date', setdate.val()); //store in localstorage
var sleep = Appery('msm_sleep'); //get value
var date = localStorage.getItem('date'); //get date
localStorage.setItem('sleepscore' +date, sleep.val()); //store key and value
What am i missing?
Cheers
Hello Peter,
Could you please try this code:
prevar setdate = Appery("date").attr("defaultDateValue");/pre
Hi this worked.
For anyone interested, this the code i used successfully:
pre
var setdate = Appery("date").attr("defaultDateValue"); //get defaultdate
//alert(setdate); to check if successful
//localStorage.setItem('date', setdate); //key:date, value:15/07/2014 (or whatever date is) if you want to save date
var sleep = Appery('msm_sleep'); //mobiledropdown component value
localStorage.setItem('sleepscore' + setdate, sleep.val()); // save name +date (in this case sleepscore15/07/2014) and value.
/pre
Peter,
Thank you for the update, glad it works!
Hi thanks for the reply, I am still thinking on how to actually do this, but can I have an unrelated question?
I have a DatePicker component, and I want to get the value using javascript..
I am doing
codevar startdate = Apperyio('start_date').val();
var enddate = Apperyio('end_date').text();
var startdate1 = Apperyio("start_date");
alert(startdate);
alert(enddate);
alert(enddate)1;/code where start_date and end_date are datepicker names.
but no value is showing up.. But var startdate1 = Apperyio("start_date"); shows [object Object] on alert
Hello!
Please try this
prevar startdate = Apperyio('start_date').getOptions().defaultDate;/pre
Please make the same for other.