【问题标题】:How to set firstday of the week in oracle jet datepicker如何在 oracle jet datepicker 中设置一周的第一天
【发布时间】:2020-06-17 08:37:51
【问题描述】:

我无法在 oracle jet datepicker 中设置一周的第一天,而在 jquery ui 中设置很简单

谢谢。

【问题讨论】:

标签: javascript jquery-ui datepicker jquery-ui-datepicker oracle-jet


【解决方案1】:

它更像是一个 Javascript 问题,你可以得到一周的第一天(我假设一周从星期日开始)

let currDate = new Date; // get current date
let first = currDate.getDate() - currDate.getDay(); // First day is the day of the month - the day of the week
let firstday = new Date(currDate.setDate(first)).toUTCString();
console.log(firstday);

现在你可以在 oj-date-picker 元素中使用这个变量 firstday 作为值

【讨论】:

    猜你喜欢
    • 2012-08-22
    • 2017-12-16
    • 1970-01-01
    • 1970-01-01
    • 2019-10-07
    • 2012-11-17
    • 2014-08-28
    • 2019-08-30
    • 2013-11-30
    相关资源
    最近更新 更多