I have a chatbot created in Dialogflow ...and i want to add a calendar date picker in the moment i ask for the date of the meeting for example
The webhook ( in javascript) related with this intent is :
function makeAppointment (agent) {
const appointmentDuration = 1;// Define the length of the appointment to be one hour.
const dateTimeStart = convertParametersDate(agent.parameters.date, agent.parameters.time,timeZoneOffset);
const dateTimeEnd = addHours(dateTimeStart, appointmentDuration);
const appointmentTimeString = getLocaleTimeString(dateTimeStart);
const appointmentDateString = getLocaleDateString(dateTimeStart);
return createCalendarEvent(dateTimeStart, dateTimeEnd).then(() => {
agent.add(` Danke vielmals `);
}).catch(() => {
agent.add(` Es tut mir leid`);
});
}
This version is used in facebook ...now i'm working for web version of the chatbot( created in angular) . What i'm looking is : chatbot ask for parameter date for example ...to display the calendar and user to pick the date from the calendar ( not to type it)
Do you have any idea how to do this ?