Closed davidpazo closed 5 years ago
Hi @davidpazo,
did you try https://amsul.ca/pickadate.js/api/#method-set-disable-enable-dates
picker.set('disable', [
// Using a range object with a “from” and “to” property
{ from: [2016,2,14], to: [2016,2,27] }
])
picker.set('enable', [
{ from: [2016,2,24], to: [2016,2,27] }
])
You can either use [YEAR,MONTH,DATE]
or parse the with new Date()
Hi @DanielRuf sorry for delay in answer, i don´t have so much time to invert in this for my job, but i try it youw suggest and the same.
I got no errors but the data isn´t disable. I try with the examples in docs, if i put 1,3,7, or true, the picker is disable, but, if i pass an: { from: [2016,2,24], to: [2016,2,27] }
The picker ignored the datas to disable and worked normally.
Thank you for all.
Thanks for your example @DanielRuf i probe your code, and dont work in my application.
I have a laravel framework, with Robust template for views that has the pickadate.js in mi libraries, maybe i can call to a web api of pickadate?
I put the code like this:
` var $input = $('#datefilter_inicio, #datefilter_fin').pickadate();
var picker = $input.pickadate('picker')
picker.set'disable', [
{ from: [2019,2,14], to: [2019,2,27] }
])`
Thank you for all
var picker = $input.pickadate('picker')
This is probably not one instance but returns two.
Generally it should work with my code. You may want to start with my small reproducible example and extend it step for step until you get your desired setup. Start with one single and simple pickadate instance.
Okei, i go probe, thank you so much.
Hi @davidpazo,
could you solve it?
I want to develop an application to manage the vacation of workers.
I try to block the datas that are assigned to th workers, so for this, I send the datas that are stored in the database, the array that i have is similar to this:
This is my code:
So, with the start and end data i want to block it in the datepicker, i see in the doc that i can to block weeks, or numbers, but i can´t insert the data in the datepicker, can anyone help me?
Thanks in advance for any help that we can provide me.
And sorry for my english, i except that explain fine.