hello, i recently purchased nicepage and am using the most recent desktop version on windows 11.
i am attempting to use the html element to create a date range picker.
I have used the Site Settings and Page Settings to add Additional Head HTML and CSS as follows and in the attached file.
Additional Head Html is:
CSS is:
the CSS does not ever show up in the rendered html page (by nicepage) but the javascript does.
in fact, when i add the CSS to the Page Settings...it is never saved and disappears from the Page Settings when it is revisited.
It does stay put in the Site Settings CSS...but is not rendered in the html output of nicepage.
How I am attempting to create the daterange picker within Nicepage:
I add the javascript links in the Additional Head HTML in the Site and or the Page Settings (have tried all options)
I add the CSS in the Site and or Page Settings (have tried all options).
In the HTML block on the page I have been inserting:
<i class="fa fa-calendar"></i>
<span></span> <i class="fa fa-caret-down"></i>
$(function() {
var start = moment().subtract(29, 'days');
var end = moment();
function cb(start, end) {
$('#reportrange span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'));
}
$('#reportrange').daterangepicker({
startDate: start,
endDate: end,
ranges: {
'Today': [moment(), moment()],
'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
'Last 7 Days': [moment().subtract(6, 'days'), moment()],
'Last 30 Days': [moment().subtract(29, 'days'), moment()],
'This Month': [moment().startOf('month'), moment().endOf('month')],
'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
}
}, cb);
cb(start, end);
});
And I get nothing.
I haven't figured this out, have done plenty of variations and googled about regarding nicepage and html element.
When I create a singular html page the date-range-picker works just fine using the following URL:
https://airpinky.com/picker.html
thank you for your quick response.
best
pat