AngularJS, Datepicker(minDate, maxDate) and Rails

144 views
Skip to first unread message

Rodrigo de Sá

unread,
Feb 24, 2016, 12:39:59 PM2/24/16
to AngularJS
Good afternoon guys, I am Brazilian and I need to perform the following task:

Make the following treatments:

1 - When selecting the start date, whenever the user opens the date datepicker end, be blocked the period prior to the start date and showing the month of the start date;

2 - When selecting end date before selecting start date, when you open datepicker start date come with dates after the end date blocked, preventing the user to make a nonsense as the date of later start date to end.

Following is the list of screens to make the adjustment:

- Holidays and Optional Points - / feriado_facultativos
- Holiday Registration - / vacation (if not remove this screen)
- Licenses / Clearances - / licenses (If you do not remove this screen)
- People - people (The following tabs: manning, point breaks, holidays and sick leave)

P.S .: Remember not to set the dates automatically, but validate the calendar to block the anterior or posterior invalid periods





Well, as you guys can see Annexes I'm trying to do first on page: / feriado_facultativos, and datepicker is angular, in which he pulls the datepicker jqueri and sets itself to create a new holiday. I researched something, but I'm not able to implement in AngularJS and I need you guys help.



PS .: is attached javascript file angle /feriado_facultativos.js and the form to create a new holiday: /_form.html.erb, and large screen. Thank you very much in advance! And sorry for the spelling and grammar and syntax, since I am using Google translator.
tela-ff.png
form-ff.png
angular-00.png
angular-01.png
angular-o2.png

Sander Elias

unread,
Feb 24, 2016, 11:12:14 PM2/24/16
to AngularJS
Hi Rodrigo,

If you want help with a problem like this, you should build a plunk/fiddle/code-pen illustration your issue. Are you aware that attaching a lot of data here makes a lot of people downloading it?
Also, people do not like to download, and review screen dumps just to be able to help you. (well, at least I don't ;))

Regards
Sander
Reply all
Reply to author
Forward
0 new messages