Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Jquery-Datepicker Min und Max Datum

Empfohlene Antworten

Veröffentlicht

Hallo,

ich habe einen Datepicker in meine Webseite eingebunden.

Beim öffnen des Kalenders werden 3 Monate angezeigt.

Nun möchte ich, dass der Kalender nur einen Zeitraum (z.B.) vom 1.1.2011 - 31.3.2011 beinhaltet.

Der User soll also im Januar nicht mehr zu Dezember 2010 oder im März zu April 2011 wechseln können.

Ist dies möglich? Dachte, dass man das über die MinDate und MaxDate-Optionen lösen kann.

Aber dies führt nicht zum gewünscht Effekt. Muss ich ein bestimmtes Datumsformat eingeben. Hier der Codeschnipsel :)

$('#Name_datepicker').datepicker({

			numberOfMonths:3,

			minDate: '1.1.2011',

			maxDate: '31.3.2011'


});

Danke für eure Hilfe ;) Liebe Grüße,Sarene

Also hier: jQuery UI - Datepicker Demos & Documentation

steht ja folgendes:

Restrict the range of selectable dates with the minDate and maxDate options. Set the beginning and end dates as actual dates (new Date(2009, 1 - 1, 26)), as a numeric offset from today (-20), or as a string of periods and units ('+1M +10D'). For the last, use 'D' for days, 'W' for weeks, 'M' for months, or 'Y' for years.

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.