首页 \ 问答 \ jQuery UI:Datepicker设置年份范围下拉到100年(jQuery UI: Datepicker set year range dropdown to 100 years)

jQuery UI:Datepicker设置年份范围下拉到100年(jQuery UI: Datepicker set year range dropdown to 100 years)

使用Datepicker,默认年份下降仅显示10年。 用户必须点击去年才能增加更多年。

我们如何将初始范围设置为100年,以便用户默认看到一个较大的列表?

在此输入图像说明

    function InitDatePickers() {
        $(".datepicker").datepicker({
            changeMonth: true,
            changeYear: true,
            showButtonPanel: true,
            maxDate: '@maxDate',
            minDate: '@minDate'
        });
    }

Using the Datepicker the year drop down by default shows only 10 years. The user has to click the last year in order to get more years added.

How can we set the initial range to be 100 years so that the user will see a large list by default?

enter image description here

    function InitDatePickers() {
        $(".datepicker").datepicker({
            changeMonth: true,
            changeYear: true,
            showButtonPanel: true,
            maxDate: '@maxDate',
            minDate: '@minDate'
        });
    }

原文:https://stackoverflow.com/questions/13865218
更新时间:2022-08-19 21:08

最满意答案

这是一个已知的问题 。

ASP.NET 5:在Windows 7 SP1上,如果没有Powershell 3.0,则无法安装DNX SDK。

症状

创建ASP.NET 5项目时,会收到以下错误消息:

DNX SDK版本的“dnx-clr-win-x86.1.0.0-beta5”无法安装。 该解决方案将使用DNX SDK版本的“dnx-clr-win-x86-1.0.0-beta5”进行此会话

解决方法

要解决此问题,请安装Windows Powershell 3.0(或更高版本),并尝试再次创建项目。 要查看您当前的PS版本,请运行$PsVersionTable命令( 详细信息 )。

链接:

  • 如何安装Windows PowerShell 4.0 。
  • 在Windows 7上安装PowerShell 3.0 。

This is a known issue.

ASP.NET 5: On Windows 7 SP1, DNX SDK cannot be installed without Powershell 3.0.

Symptoms

When you create an ASP.NET 5 project, you receive the following error message:

DNX SDK version 'dnx-clr-win-x86.1.0.0-beta5' failed to install. The solution will use DNX SDK version 'dnx-clr-win-x86-1.0.0-beta5' for this session

Workaround

To work around this issue, install Windows Powershell 3.0 (or higher) and try to create the project again. To see your current PS version, run $PsVersionTable command (details).

Links:

相关问答

更多
  • 目前,DNX MSBuild目标仅与Visual Studio 2015(特别是Web开发工具组件)一起安装。 https://github.com/aspnet/dnx/issues/2207#issuecomment-120076364 所以看起来我必须在构建服务器上安装Visual Studio 2015 Community Edition。 人们说我应该从命令行使用dnu ,但问题是我需要创建一个MSDeploy包和AFAIK,只有MSBuild才能这样做。 看起来我需要读这个。 http://do ...
  • “dnx run”命令在vscode中不可用,因为默认情况下它不在project.json命令部分中。 我不得不改变我的project.json "commands": { "ConsoleApplication": "ConsoleApplication" }, 对此 "commands": { "run": "TestConsoleApp" //this is the name of you ...
  • 我的问题出现在我的雇主阻止在用户配置文件目录中执行的.exe文件的地方。 我将我的C:\ Users \%USERPROFILE%.dnx文件夹移动到C:\ Program Files.dnx文件夹中,并使用以下命令创建了一个符号链接: mklink /D C:\Users\%MYPROFILENAME%\.dnx "C:\Program Files\.dnx" 到目前为止,这似乎正在工作,我正在运行。 I found a "temporary" workaround by making the .dnx ...
  • 如果您继续引用dnxcore50作为可能的目标框架,Visual Studio将阻止您构建,除非所有引用的包与它兼容。 它试图确保您可以在两个框架上运行应用程序。 您只需从框架中删除dnxcore50即可删除依赖项,并确保始终为dnx451构建。 "frameworks": { "dnx451": { "dependencies": { "Facebook": "7.0.6" } } }, If you keep referencing dnxcore50 as a p ...
  • 这是一个已知的问题 。 ASP.NET 5:在Windows 7 SP1上,如果没有Powershell 3.0,则无法安装DNX SDK。 症状 创建ASP.NET 5项目时,会收到以下错误消息: DNX SDK版本的“dnx-clr-win-x86.1.0.0-beta5”无法安装。 该解决方案将使用DNX SDK版本的“dnx-clr-win-x86-1.0.0-beta5”进行此会话 解决方法 要解决此问题,请安装Windows Powershell 3.0(或更高版本),并尝试再次创建项目。 要查 ...
  • 原来我需要使用以下命令重置DNX主目录 set DNX_HOME= Turned out I needed to reset the DNX home directory using the following command set DNX_HOME=
  • CTP6是为ASP.NET 5堆栈的beta3构建的。 你不应该期望它处理任何比这更新的东西,特别是考虑到自beta3建成以来所有的工具都被赋予了新的名称。 如果您希望继续使用带有最新 beta4内容的Visual Studio,则需要等待新的CTP构建。 如果你想使用CTP6,请确保你使用beta3包,包括来自master分支的kvm。 正如评论中所指出的,有一个beta4软件包的编译列表,它仍然可以在github上使用CTP6。 如果您希望使用最新的dev位,我建议您使用您喜欢的编辑器和OmniShar ...
  • 编辑 :请注意,这仅适用于RC1。 RC2不支持那些可执行文件。 他们将被dotnet-cli取代。 我想我知道你想要什么,但如果不是那个,请告诉我,我会调整我的答案。 dnvm:.NET版本管理器 管理不同的运行时,还允许您选择当前运行时。 dnu:.NET实用程序 管理包裹。 一旦您启动并运行应用程序,主要用于dnu restore 。 dnx:.NET执行引擎 通过执行命令运行您的应用程序/网站。 通常dnx web但web是在你的project.json定义的,所以它可以是任何东西。 那么如何更改运 ...
  • 将DNX版本放在global.json文件中,该文件位于解决方案的根目录中(如此处所示 )。 { "sdk": { "version": "1.0.0-beta4" } } 您可能需要重新启动Visual Studio。 另一种方法是通过Visual Studio中的项目属性对话框进行配置: Put the DNX version inside the global.json file which lives on the root directory of your so ...
  • 嗯,解决方案是将命令放在project.json中的依赖项声明之后 { "version": "1.0.0-*", "description": "project Class Library", "authors": [ "me" ], "tags": [ "" ], "projectUrl": "", "licenseUrl": "", "frameworks": { "dnx46": { } }, "dependencies": { "Microsof ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。