I am new for mongoose. I am using "Date" as type for my "holidayDate" column. I want to store only date not time in my "holidayDate" column so is there any way to define date format in domain model so when my domain is save my "holidayDate" column value will save according to the date format of domain model.
var HolidaySchema = new Schema({
holidayName: {
type: String,
default: '',
required: 'Please fill holiday name',
trim: true
},
holidayDate: {
type: Date,
required: 'Please fill From Date'
}
});
mongoose.model('Holiday', HolidaySchema);