Hi I'm new in web development and I'm trying to make a firebase app with the firestore database. I have a user registration form and in this form I need to get the date. For the date I used datepicker but I can't get the selected date and after transform it into firestore Timestamp. I tried this but I don't know if something is correct:
Html form:
<input class="datepicker" type="text" id="subscriptionDeadline" placeholder="Subscription Deadline">
Javascript code:
var currentDate = $(".subscriptionDeadline").datepicker("getDate");
var timeStamp = new firebase.firestore.Timestamp.fromDate(currentDate);
I get this error :
Uncaught TypeError: Cannot read property 'Timestamp' of undefined