These are chat archives for Automattic/mongoose

Dec 2017
Mohamed Nasrullah
Dec 04 2017 02:11
date range filter not working in aggregate query. any idea?
Vlado Tesanovic
Dec 04 2017 09:32
@nasr18 it should work
Paul "Joey" Clark
Dec 04 2017 14:25
@nasr18 Make sure you have real date objects, not date strings.
.find() will work with a string or a number, but .aggregate() will not.
So we wrap our aggregate dates in new Date(_) just to be sure.
Dec 04 2017 17:34
hey guys i need help. this is my forms that i will have to save data to mongodb. but on submit it only saves the id to the db. when i use chrome debugger to check and it only sends the id. any help with that?
<form action="/customers" method="POST">
                            <h5>Add customer details here</h5>
                            <div class="form-row">
                                <div class="form-group col-md-6">
                                    <label for="inputCusName">Customer Name</label>
                                    <input type="text" name="customerName" class="form-control" id="inputCusName" placeholder="type here...">
                                <div class="form-group col-md-6">
                                    <label for="inputJJob">Occupation</label>
                                    <input type="text" name="customerOccupation" class="form-control" id="inputJJob" placeholder="type here...">
                            <div class="form-row">
                                <div class="form-group col-md-6">
                                    <label for="inputItemType">Location</label>
                                    <input type="text" name="customerLocation" class="form-control" id="inputItemType" placeholder="type here...">
                                <div class="form-group col-md-6">
                                    <label for="inputCusTel">Telephone</label>
                                    <input type="number" name="customerTelephone" class="form-control" id="inputCusTel" placeholder="type here...">
                            <button type="submit" class="btn btn-primary">Add</button>