目前我有这个:
Now() - Weekday(Now(), vbMonday) + 1
问题是,如果我使用不同的一周,相同的日期仍会显示。
我有一个下拉列表,显示我选择的那一周的日期。现在它从本周开始选择它,所以在第1周,星期一的日期已经是第9个。
它应该如何: 我选择一个周数,与该周数对应的日期需要显示在下拉列表中。
有人可以帮帮我吗?我真的不知道该怎么办..
答案 0 :(得分:0)
如果我有你,你可以使用这样的东西。
update: function (req,res) {
var id = req.params.id;
var placeJSON = {street_number: req.param('street_number'), street_name: req.param('street_name'), additional_info: req.param('additional_info'), postcode: req.param('postcode'), town: req.param('town'), country: req.param('country')};
if (!id) {
console.log("No id specified.");
return res.send("No id specified.",500);
}
Place.update(id, {
place_name : req.param('place_name'),
description : req.param('description'),
capacity : req.param('capacity'),
place_address : placeJSON
}).exec(function (err, updatedPlace) {
if (err) {
res.redirect('/place/edit');
}
if(!updatedPlace) {
res.redirect('/place/edit');
}
//res.redirect('/place');
res.redirect('/place/show/'+id);
});
}