在一列上具有完整日期 (DDD MMM) 的日期时间选择器

Datetime picker with full date (DDD MMM) on one single column

我想创建一个具有以下格式的日期时间选择器: 我想我将不得不创建一个具有关联值的自定义列表,但不知道如何在日期时间选择器的视图中使用它。

有线索吗?

您可以使用这个插件 - skwas-cordova-plugin-datetimepicker (also see npm link).

快速示例 -

document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {

var myDate = new Date(); // From model.

cordova.plugins.DateTimePicker.show({
    mode: "datetime", //you want to pick date and time both from spinner
    date: myDate,
    allowOldDates: true,
    allowFutureDates: true,
    minuteInterval: 15,
    locale: "EN",
    okText: "Select",
    cancelText: "Cancel",
    android: {
        theme: 16974126, // Theme_DeviceDefault_Dialog
        calendar: false,
        is24HourView: true
    },
    success: function(newDate) {
        // Handle new date.
        console.info(newDate);
        myDate = newDate;
    },
    cancel: function() {
        console.info("Cancelled");
    },
    error: function (err) {
        // Handle error.
        console.error(err);
    }
});
}

On Lollipop and upwards the date and time pickers changed to calendar and radial pickers. If you want to use spinners (for example to use minuteInterval), choose a theme that shows a date and time picker with spinners, like Theme_DeviceDefault_Light, Theme_Holo_Dialog or the traditional theme.

然后您可以将 Theme 设置为 here 中合适的常量 int 值,以将径向默认视图更改为微调器视图。