datepicker

disable all previous dates in angular bootstrap datetimepicker

混江龙づ霸主 提交于 2019-12-11 11:32:53
问题 I am creating a project using angularjs. I am integrated the angulardatetimepicker from the link: https://github.com/dalelotts/angular-bootstrap-datetimepicker. Now I want to disable all previous dates from current date. Here is my code: function beforeRender($view, $dates, $leftDate, $upDate, $rightDate) { var minDate = moment().startOf($view).valueOf(); for(var i=1; i < $dates.length;i++) { if(new Date().getTime() > $dates[i].utcDateValue) { $dates[i].selectable = false; } } } This code not

Using DatePicker on custom dialog

微笑、不失礼 提交于 2019-12-11 11:01:43
问题 Well ,thats my code.I want to take values from a DatePicker from a custom Dialog. When i try to initialize dp (DatePicker) i got a nullPointerException error and i cant take the values from DatePicker to variables. :/ Anyone knows what is going on? (I have 1 layouts. The main (R.layout.notifications) and the dialog layout (R.layout.notifications_dialog) the datepicker is on the notifications_dialog layout. public class Notifications extends Activity { static final int CUSTOM_DIALOG_ID = 0;

jquery datepicker after setDate no longer able to change Month and Year in the header

不羁岁月 提交于 2019-12-11 10:57:23
问题 I'm using the JQuery UI Datepicker to pick date. I set "changeMonth" and "changeYear" to true at the initialization. $( "#from" ).datepicker({ defaultDate: "+1w", changeMonth: true, changeYear: true, dateFormat: 'yy-mm-dd', onClose: function( selectedDate ) { $( "#to" ).datepicker( "option", "minDate", selectedDate ); } }); $( "#to" ).datepicker({ defaultDate: "+1w", changeMonth: true, changeYear: true, dateFormat: 'yy-mm-dd', onClose: function( selectedDate ) { $( "#from" ).datepicker(

How can I add button click for call a method if I click icon next month in the datepicker on vuetify?

天涯浪子 提交于 2019-12-11 10:55:23
问题 I want to ask. How can I add button click for call a method if I click icon next month in the datepicker? Look at this : How can I do it? Update : I using vuetify : https://vuetifyjs.com/en/components/date-pickers#date-pickers-allowed-dates 回答1: Probably you're looking for something like this: https://vuetifyjs.com/en/components/date-pickers#date-pickers-react-to-displayed-month-year-change Basically you should use the picker-date.sync prop and watch for its changes using a watcher. <v-date

How can I get month moment js in loop on the vue?

非 Y 不嫁゛ 提交于 2019-12-11 10:54:31
问题 I have a problem Look at this : https://codepen.io/positivethinking639/pen/YzzWyaR?editors=1010 If the script executed, the result of console.log(date) is Whereas from my script should the result 2019-10-01 2019-10-02 ... ... 2019-10-31 why the results don't match? if I choose next month, the results will also not match 回答1: Updated for loop initialisation for(var i = 1; i <= totalDay; i++) { and let date = moment().month(val.split('-')[1]-1).date(i).format("YYYY-MM-DD") Now it works as

Attach click event for the weekday labels in Angular UI Bootstrap datepicker

为君一笑 提交于 2019-12-11 10:53:56
问题 I'm using Angular UI Bootstrap datepicker with the gm.datepickerMultiSelect extension and I'd like to make weekdays labels clickable, so that I could select all days in the month (like all Wednesdays). I can get/calculate all days of the same weekday and add them to the selected days scope, but as I'm rather new to AngularJS & Bootstrap UI, I can't find the right way to trigger that click event for the labels. 回答1: Angular UI Bootstrap lets you override their directive's templates. You can

Custom datepicker html helper for mvc4 using Razor View

南笙酒味 提交于 2019-12-11 10:49:19
问题 Are there any tutorial for datepicker control for mvc4 using razor view . I went through the below mentioned link but sadly it uses aspx instead of razor. http://www.codesprouts.com/post/Creating-A-DatePicker-Extension-In-ASPNet-MVC.aspx Could any one please help me in creating datepicker control html helper using razor view. The main problem is being that i have to get the date picker control in IE8 browser and sadly Jquery Datepicker control doesnt seem to be working in IE8 browser, i tried

Displaying time difference with javascript/jquery

蓝咒 提交于 2019-12-11 10:46:19
问题 I'm using a datepicker to choose dates, I want to calculate difference between dates choosen & then alert the difference.I'm not able see the code work HTML datepicker <input type="date" size="8" name="advDurFrom" /> <input type="date" size="8" name="advDurTo"/> Javascript $('input[name=advDurFrom]').click(function() { var x=$('input[name=advDurFrom]').val(); var date1 = new Date(x); }); $('input[name=advDurTo]').click(function() { var y=$('input[name=advDurTo]').val(); var date2 = new Date(y

Very basic jquery datepicker in Razor

会有一股神秘感。 提交于 2019-12-11 10:28:24
问题 I am in the visual studio 2010 MVC4 razor microsoft template. I downloaded the jquery "kit" from the jquery site and it works when I open up the index.html. However, when I change my razor project to look like the jquery download (move all the JS files, images, and css files into the right places) and add in the following code (which works in the html case) <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>jQuery UI Example Page</title> <link type="text/css"

MVC Datepicker for both holidays and weekends

江枫思渺然 提交于 2019-12-11 10:06:19
问题 Datepicker <script type="text/javascript"> var array = ["2015-11-25", "2015-11-27", "2015-11-29"] $(function () { $(".datepicker").datepicker({ beforeShowDay: $.datepicker.noWeekends, minDate: 0 }) //$("#startDate").datepicker({ minDate: new Date(), beforeShowDay: $datepicker.noWeekends }); $("#startDate").datepicker(); }); $('input').datepicker({ beforeShowDay: function (date) { var string = jQuery.datepicker.formatDate('yy-mm-dd', date); return [array.indexOf(string) == -1] } }); $(function