Hi,
I need to create a calendar on a form:
Therefore I created a :
- new Form where the JavaScript is defined to create the calendar
- HTML Object (to show the calendar)
- Date Picker to select the month that should be displayed
I didn't find a way how to use the selected date from the Input object (Datum) and to refresh the calendar based on the selected month of the input object.
Is there a way to forward the selected date to the JavaScript and to re-build the calendar without storing the value of the input object in the database?
BR,
Oli
Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
Refresh HTML object and rerun JavaScript on Form
Refresh HTML object and rerun JavaScript on Form
You do not have the required permissions to view the files attached to this post.
-
- nuBuilder Team
- Posts: 4304
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 445 times
- Contact:
Re: Refresh HTML object and rerun JavaScript on Form
If you have a JS function where the calendar is created, call that by passing the date of the input.
e.g.:
Call in the onchange event of your date input:
e.g.:
Code: Select all
function createMyCalendar(date) {
// ... code to create the calendar...
}
Call in the onchange event of your date input:
Code: Select all
createMyCalendar($('#your_date_object_id').val());
Re: Refresh HTML object and rerun JavaScript on Form
Thank you ... works great.
Now I have another issue.
I need to refresh the form once the date field was changed.
I tried using this in the onchange code of the date selector:
which is not working and I can't do any change on the form. Is there another possibility I could use therefore?
BR,
Oli
Now I have another issue.
I need to refresh the form once the date field was changed.
I tried using this in the onchange code of the date selector:
Code: Select all
nuGetBreadcrumb();
BR,
Oli
-
- nuBuilder Team
- Posts: 4304
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 445 times
- Contact:
Re: Refresh HTML object and rerun JavaScript on Form
Does this work?
Code: Select all
nuHasNotBeenEdited();
nuGetBreadcrumb();