Hi guys, I was thinking I might be able to use a datepicker to select a date and then store it in wix bookings or google calendar or maybe into a dataset that can then go into the wix bookings? Basically it will be for a client to select a name and date. I looked up the datepicker and it has example code of adding it to a dataset so I am thinking this could do the trick?
I have also just seen this:
- and wondering if this is another option, as the code on the page appears to import data into a field within a dataset:
wixData.insert( “CollectionName” , { “fieldKey” : “value” });
I have put the code onReady() and added this code before the page but I am getting errors:
import wixData from ‘wix-data’;
Not sure if that is what I am looking for either. Some guidance would be good!
Okay. I have managed to insert the date entry into the date field in my database. It creates a new row so I need to figure out code to match the name selected (on dropdown) and put the date in with that row next.
I have also just found: import wixBookings from “wix-bookings” ; and see you can actually import directly into a booking. How do I do this? What collection do I connect with in code? Thanks!
@russian-dima Thanks. Before I look into that, I have been looking at the Submit Button that connects to the dataset and the action is connected to submit. It enters the data such as name and date, into the dataset. How do I connect this data to the wix booking so it is stored there and shows on the calendar etc?
@russian-dima Thanks russian-dima. I spent hours considering the submit button option and came across this forum post that might help others interested:
In the meantime I am looking at shans post on using the google calendar api
https://www.wix.com/velo/forum/tips-tutorials-examples/example-google-calendar-api-create-event-in-your-google-calendar-with-corvid
- It has the date picker and I can change the name input to a name dropdown pulling from a names dataset. My only question now is, when all the information is in the google calendar, how does this connect to wix bookings? Is it automatic, or do I need to do some kind of code connection? @shan
Thanks so much.