Fetch week number and week start & end date using bootstrap datepicker
问题 BootStrap DateTimePicker is there any option available to fetch the week number and week start and end date from the calendar. Demo link $('#datetimepicker1').datetimepicker({ format: 'DD/MM/YYYY', calendarWeeks:true }); Something similar to the HTML5 week attribute <input type="week"/> 回答1: I would rely on moment to provide the data you are looking for, specifically the Day of Week and Format functions http://momentjs.com/docs/#/get-set/day/ http://momentjs.com/docs/#/displaying/format/ See