jquery-ui-datepicker

jQuery UI datepicker: How to change the month names in the drop-down from short to long names?

房东的猫 提交于 2019-12-03 10:12:27
I need to change the month names from short names to long names in my jQuery UI datepicker. My properties are: $.datepicker.regional['de'] = { prevText: '<zurück', nextText: 'vor>', monthNames: ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'], monthNamesShort: ['Jan', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'], dayNames: ['Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag'], dayNamesShort: ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'], dayNamesMin: ['So', 'Mo', 'Di'

Use jQuery DatePicker in Bootstrap 3 modal

 ̄綄美尐妖づ 提交于 2019-12-03 08:44:41
I would like to use jQuery UI datepicker in a modal. The real problem is that if I want to also show years and months, it shows me empty selects: Using firebug, it seems that the option tags are under the modal. This is my HTML: <div class="modal-dialog"> <div class="modal-content"> <form id="add-form" action="#" method="post"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="modal-title">Add</h4> </div> <div class="modal-body"> <div class="input-group"> <div class="input-group"> <label for="date">Date</label> <input

jQuery UI datepicker performance

我们两清 提交于 2019-12-03 07:11:33
I have a textbox on my web page that is used to specify a date, so I'd like to use the jQuery DatePicker . However, most of my users are locked into using IE6 and the performance of the jQuery DatePicker is a little sluggish in this browser. Can anyone recommend an alternate JavaScript date picker, or any means of improving the display performance of the jQuery DatePicker? I also ran into this problem. Here are a couple of things that can help performance in IE6: Turn on background image caching. This will load images before the datepicker is shown: try { document.execCommand(

How to get a datepicker for Html.Editorfor

淺唱寂寞╮ 提交于 2019-12-03 07:08:37
On my MVC3 razor page I have a date field @Html.EditorFor(model => model.Member.Dob) Given below is the code I am trying to get a datepicker for the Date of Birth field. <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script> <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"><

getting jQuery UI's datepicker to always open in a certain direction?

半世苍凉 提交于 2019-12-03 05:06:48
问题 I'm using jQuery UI's datepicker control in a position: fixed toolbar at the bottom of my page. Occasionally, on random computers, the datepicker appears below the toolbar, which means it's off the page and impossible to view or interact with. Is there a way to force the positioning of the datepicker control to always be above and to the right of its <input> ? 回答1: You could change the lines: offset.left -= (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ? Math.abs(offset.left +

How do I convert between date formats used by jquery ui datepicker and moment.js? [closed]

孤人 提交于 2019-12-03 03:56:00
The date formatting string has different rules in jQuery UI datepicker, moment.js, DateTime class from .Net. How do I convert between these different formats? Update: Now on github: https://github.com/deerchao/dateformats Use the TypeScript version like this: var j = dateFormat.convert('YYYY-MM-DD', dateFormat.momentJs, dateFormat.datepicker); Here is the TypeScript version: module dateFormat { export interface formatRules { DayOfMonthShort : string; DayOfMonthLong : string; DayOfWeekShort : string; DayOfWeekLong : string; DayOfYearShort : string; DayOfYearLong : string; MonthOfYearShort :

How do i disable public holidays in a jQuery UI date picker?

泪湿孤枕 提交于 2019-12-03 03:40:40
I'm making a holiday booking application and obviously you don't need to book off holidays that are already given to you, so I need to know how I can disable, Christmas, for example from the date picker every year without me having to change the code every year. This is my jQuery UI date picker code so far: <script> $(function() { $("#from").datepicker({ beforeShowDay: $.datepicker.noWeekends, defaultDate: "today", changeMonth: true, numberOfMonths: 1, minDate: "today", dateFormat: "dd/mm/yy", onClose: function(selectedDate) { $( "#to" ).datepicker("option", "minDate", selectedDate); } }); $("

Which way to add text to jquery ui datepicker cell?

雨燕双飞 提交于 2019-12-03 03:11:54
I need to show custom text on some dates at Jquery UI datepicker , to be more precise, to render a specific price for some dates. My idea was to use beforeShowDay to attach specific price in titles of such dates and then, in beforeShow to check out each td and to place title's text into the cell. Example: var m, d, y, checkDate, specificPrice = ''; var specificPrices = {"2013-3-8":"300 EUR", "2013-2-26":"263 EUR"} $('#my-datepicker').datepicker({ beforeShowDay: function checkAvailable(date) { m = date.getMonth(); d = date.getDate(); y = date.getFullYear(); checkDate = y + '-' + (m+1) + '-' + d

ASP MVC DateTime validation error

微笑、不失礼 提交于 2019-12-02 21:38:58
问题 In asp.net MVC 5, I have a form that displays data from a DTO object: public class FieldDTO { [DataType(DataType.DateTime)] [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:dd/MM/yyyy}")] public DateTime StartFieldDate { get; set; } [DataType(DataType.DateTime)] [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:dd/MM/yyyy}")] public DateTime StopFieldDate { get; set; } public String FieldName { get; set; } [DataType(DataType.DateTime)] [DisplayFormat

jQuery: datepicker alternative

扶醉桌前 提交于 2019-12-02 21:02:45
Is there a better, smaller alternative to the jQuery datepicker? The ui.datepicker.js has app. 70kb which is pretty huge imo. Could it be compressed? you don't need the whole ui library just http://jqueryui.com/download disable the other stuff or you can use google ajax api cdn. the best alternative to jui datepicker is the html5 datepicker with is only supported by opera so far <input type="datetime-local" /> The best alternative I know is Kelvin luck's datepicker . It's not smaller in terms of file size, but arguably "better" is the Any+Time™ DatePicker/TimePicker AJAX Calendar Widget ,