Angular Bootstrap Datepicker Keep Selected Date on Arrow Navigation - javascript

When you navigate from month to month using the datepicker, it makes the first day of the month active. The only active date I want, is the initial one or the one I click on like seen here http://jsfiddle.net/the_menace/ddvg5wg1/
Looking in the ui-bootstrap-tpls.js file i found the $scope.move function that set's the first day of each mont as active with this line of code
self.activeDate.setFullYear(year, month, 1);
When I remove the 1, a random date is set to default. How can I have the highlighted date to only be he initial one or the one I click on?

Related

Is there any way to fill the empty week days cells(previous and next months) in mat-datepicker and mat-calendar

I'm setting a calendar to Help users to select dates, but i want to fill the empty cells at the start of the first week with the previous and next months
I'm using the Datepicker from Angular Material.
hrer is a picture link explains more :
https://i.imgur.com/cCDSBsH.png
According to their API, you can't.
You need to create your own custom calendar.

displaying specified div in order based on clicking dynamically displayed dates with jquery/javascript

Here is my code: http://js.do/jane-d0e/80399
I have predefined div's, each are going to contain different content and styles.
I want to have a user enter a start date, and then restrict the end date so they can choose up to 7 days. I have been having a problem implementing the date restriction, I try doing "+7d" for max Date but for some reason it doesn't limit it correctly, it is always showing more than the amount I specify.
So say the user chooses a date range, with 7 days total. The date range appears below. If the user clicks on the first date, the content within the first div is supposed to be displayed only. The next date that is clicked the content in the second div is displayed only, and so on. So div1 maps to first date.. div7 will map to 7th date if there is a seventh date. I thought of trying to do this with next() but this did not work, now when I run the code and select a date it opens the whole set of divs for each selected date rather than the single intended div.
What is the best way to go about achieving this?
Destroy "to" datepicker after "from" date selection to change "to" datepicker for a specific range and pass mindate, maxdate.
$("#to").datepicker('destroy');

eyecon robootstrap-datepicker - selecting all month

I wanted to ask, if eyecon robootstrap-datepicker allows to select all month on simple button click (all days of current month) ?
I don't see this option in API:
http://www.eyecon.ro/bootstrap-datepicker/
Basicly, i just want to add event to some element on page (inside of datepicker i will prepend some element, Select all month ).
And this is done, but now i dont know, what action should i do to select all days from current opened datepicker.
Thanks for help.

Angularjs: highlight selected range in datepicker hover

I'm trying to simulate a similiar effect as Kayak does in his datepicker. When you select a Depart date and then go to return date, see that the date range is highlighted when you hover a single date.
For this, i'm using a customized version of an angular datepicker and have tried things like asigning the date i'm hovering to ng-mouseover directeve and then a condition in the ng-class directive like (hover-date > depart-date), but this just add the class to the hovered date and not to the complete range (the thing that does right is not adding the class when you hovered dates before the depart-date).
Hope i'm being clear, tell me if not.

jquery ui dateinput alternative field

I am using jquery ui dateinput and i am showing the calendar when the user clicks a small image. In the calendar i have set the selectors to true, so it also shows months and years. What i want, is to pass the chosen date into a textbox as a value.
I did this so far.
$("img[id='CalIcon']").data("dateinput").onHide(function(e){
var dt = $("img[id='CalIcon']").data("dateinput").getValue('dd-mm-yyyy');
$('#relativeDOB').attr({value:dt});
});
The problem is that whatever year or month i am choosing is passing only the current. The day works fine.
Any ideas?
thanks

Categories

Resources