datepicker

JQuery datepicker - Selecting the last day of the month

心已入冬 提交于 2019-12-11 12:58:52
问题 In a report generator I wrote the user can select a date range to display results for. But since the data for this report is generated monthly the day portion of the date range is really irrelevant. I now have the requirement to change the day of the selected start date to '1' regardless of what the user has selected. I've done this like so: $('#TextStartDate').datepicker({ maxDate: "+0M", minDate: "-24M", dateFormat: 'm/1/yy' }); The second pard of the requirement is that the day of the

Datepicker: revert to last value on incorrect input

夙愿已清 提交于 2019-12-11 12:40:36
问题 Most validation plugins just show an error message. However, I would like (datepicker) to prevent entering incorrect values at all, automatically reverting to last correct value (not the intitial value on page load, but last correct one). How is that possible? 回答1: It might be me, but I tend to find this is horrific UI: if I make a typo in a date or any other field, the last thing I want is to need to retype it from scratch. Ideally, the UI should not allow you to enter an incorrect date in

How can I use fullcalendar.io as a type=“date” picker?

若如初见. 提交于 2019-12-11 12:28:30
问题 Fullcalendar.io is quickly becoming the top-choice library for calendar applications. Is it possible to use it as a <input type="date"> picker? Something like the jQuery UI "Datepicker"? I'd like to have something like... <form> <input type="date"> </form> <script type="text/javascript"> $('input[type=date]').fullCalendar() </script> 回答1: I was able to get something like I wanted with the following, $(document).ready(function() { $('#foo').click( function () { var $input = $(this); alert('bar

two-digit year on datepicker

痞子三分冷 提交于 2019-12-11 12:27:43
问题 How is this possible to select a two-digit year in ui-datepicker? When I try to select 24 year or 79 year It returns 1924 or 1979. How can I select the two-digit correctly? Thanks. 回答1: Provide date format argument: .datepicker({ dateFormat: 'dd-mm-y' }) (2 digit yeay = y, adjust rest of the format to your need) 回答2: The Datepicker plugin has one specific option for such cases - shortYearCutoff: shortYearCutoff The cutoff year for determining the century for a date (used in conjunction with

Datepicker insert date and week in field

荒凉一梦 提交于 2019-12-11 12:23:49
问题 I hope that one of you experts can help me with a problem in datepicker. I have a page with the following fields date, week, item number, description, price I can get the date picker to work for date and week but only if I assign datepicker to each of them. My problem is that I want it so that when you select the date in the date field then puts datepicker automatically week number into the week field so you do not need datepicker 2 times but only once. Unfortunately I do not have much

Struts2 JQuery Datepicker not working properly

情到浓时终转凉″ 提交于 2019-12-11 12:23:09
问题 I am using a datepicker in form to send particular date and time to my action class. But When I submit my form the datepicker value received at action is Wed Jan 29 00:00:00 IST 2014 means, the date is going correct but the time not. How can I solve the problem??? My Form : <form theme="simple" action="saveDetailsRecBackupConf" method="post" name="viewConfiguration"> <sj:datepicker theme="simple" id="addedon" name="addedon" timepicker="true" timepickerShowSecond="true" timepickerFormat="HH:mm

How can I force a DatePicker to be used for input instead of the keyboard on an HTML text input inside a WebView in Android

落花浮王杯 提交于 2019-12-11 12:21:34
问题 I am attempting to learn Android development and have modified a sample app that loads a web page in a WebView. The web page contains a text input. I want to use the Android DatePicker to input a value instead of the keyboard. The code below almost works. The DatePicker is displayed but throws an unknown error when I select a date and call loadUrl on the WebView in the onDateSet handler to update the value of the text input (end of code sample). I suspect a cross thread issue but I'm not sure

bootstrap datepicker option doesn't seem work (datepicker by vitalets) [closed]

别说谁变了你拦得住时间么 提交于 2019-12-11 12:18:53
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . I included everything but it doesn't seem work with the options, no example for a newbiew is a pain.. help.. html <input type="text" class="form-control datepicker" id="datepicker" data-date-format="dd/mm/yyyy" /> js $('#datepicker').datepicker({ autoclose: true, todayBtn: true, todayHighlight: true }); github

Yii2 datepicker in kartik gridview not working

别来无恙 提交于 2019-12-11 12:14:29
问题 I'm using kartik gridview and I want to add a datepicker to the search fields I'm also using datecontrol This is what I got, but the validation is not working: Gridview date picker: [ 'attribute'=>'date', 'value' => function ($model, $index, $widget) { return Yii::$app->formatter->asDate($model->date); }, 'filterType' => GridView::FILTER_DATE, 'filterWidgetOptions' => [ 'pluginOptions' => [ 'format' => 'dd-mm-yyyy', 'autoclose' => true, 'todayHighlight' => true, ] ], 'width' => '160px',

event bubbling in Jquery datepicker

☆樱花仙子☆ 提交于 2019-12-11 11:55:26
问题 I have a pop menu that contains a form with a jquery datepicker and the issue is that when I make a date selection, both the menu and the datepicker calendar closes. I tried to use event.stopPropagation() in the Select event for the datepicker, but the I couldn't find a way to get a handle for the "event". Also, I tried to return false at the end of the select event but again with no luck. Any help will be much appreciated. Thanks. 回答1: I was facing same issue and fixed it by adding in