How to add v-on function in sw-datepicker?

Hello. I am using sw-datepicker and i want to disable dates based on function. I want to add vue’s v-on functions to it but the datepicker isnt running them. How to add those?

We had the same problem. Solution: data-enabledDates="{PScake_enabledays}"
This calls the function „PScake_enabledays“ where (im)possible dates are calculated:

	for ($i=0; $i<($wochen*7); $i++) {
		// Sonntag, Montag und Samstag blocken
		if (date("w",$stmp)==0 OR date("w",$stmp)==1 OR date("w",$stmp)==6 ) {
	// Jetzt alle Daten zurückgeben:	
	return $blocked_string;

Mixed up enabled and blocked - sorry.

	for ($i=0; $i<($wochen*7); $i++) {
		// Nur Dienstag, Mittwoch, Donnerstag und Freitag zulassen:
		if (date("w",$stmp)>1 AND date("w",$stmp)<6 ) {
			if (!in_array($stmp,$feiertag)) {
	// Jetzt alle Daten zurückgeben:	
	return $enabled_string;

Have you called this function inside the picker properties or inside the input tag? And what argument did you give to the PScake_enabledays function? I want to disable some days of week and some dates of every month, so I need to give an entire calendar as an input. How do I do that?

We call that function in the template frontend/detail/buy.tpl like so:

			            	<input type="text"
								placeholder="{s name="datePickerInputPlaceholder" namespace="frontend/index/datepicker"}Datum wählen...{/s}"

So the „minDate“ (starting Date) is calculated by the function PScake_deliverydate and the possible days are enabled by the function PScake_enabledays (we look only 6 weeks into the future here).
The possible dates are delivered as a string, commaseparated.
You may have a look at the working example here: Spiderman Kuchen online bestellen |

Sorry - but about those „vue-functions“ I’m afraid I can’t help.

right. So in order to disable dates, I would have to set data-disabledDates to some function inside the tag?