ui.DateSlider
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
יעד שאפשר לגרור, עם טווח ליניארי בין שני תאריכים. אפשר להגדיר את סרגל התאריכים כך שיוצגו בו תאריכים במרווחי זמן שונים, כולל יום, 8 ימים ושנה. הערך של פס ההזזה מוצג כתווית לצדו.
שימוש | החזרות |
---|
ui.DateSlider(start, end, value, period, onChange, disabled, style) | ui.DateSlider |
ארגומנט | סוג | פרטים |
---|
start | תאריך|מספר|מחרוזת, אופציונלי | תאריך ההתחלה, כחותמת זמן ב-UTC, כמחרוזת תאריך או כ-ee.Date. ברירת המחדל היא לפני שבוע. |
end | תאריך|מספר|מחרוזת, אופציונלי | תאריך הסיום, כחותמת זמן בשעון UTC, כמחרוזת תאריך או כ-ee.Date. ברירת המחדל היא היום. |
value | תאריך|מספר|מחרוזת, אופציונלי | הערך ההתחלתי. הערך הוא מערך שכולל את תאריך ההתחלה ואת תאריך הסיום של טווח התאריכים שנבחר, אבל אפשר להגדיר אותו רק על ידי ציון תאריך ההתחלה. ברירת המחדל היא אתמול. |
period | מספר, אופציונלי | גודל המרווח בין הערכים במחוון בימים. ברירת המחדל היא 1. |
onChange | פונקציה, אופציונלי | פונקציית קריאה חוזרת שמופעלת כשמצב פס ההזזה משתנה. פונקציית ההתקשרות חזרה מקבלת ee.DateRange שמייצג את הערך הנוכחי של פס ההזזה ואת הווידג'ט של פס ההזזה. |
disabled | בוליאני, אופציונלי | האם המתג מושבת. ברירת המחדל היא False. |
style | אובייקט, אופציונלי | אובייקט של סגנונות CSS מותרים עם הערכים שיוגדרו לווידג'ט הזה. ברירת המחדל היא אובייקט ריק. |
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-26 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-26 (שעון UTC)."],[[["\u003cp\u003eThe DateSlider widget provides a user interface for selecting a date range on a linear scale.\u003c/p\u003e\n"],["\u003cp\u003eIt offers flexibility in displaying various date intervals, including day, 8-day, and year.\u003c/p\u003e\n"],["\u003cp\u003eUsers can customize the start and end dates, initial value, interval size, and add event listeners for changes.\u003c/p\u003e\n"],["\u003cp\u003eThe slider displays a label indicating the selected date range and supports both single date selection and range selection.\u003c/p\u003e\n"],["\u003cp\u003eStyling options are available to modify the appearance of the widget.\u003c/p\u003e\n"]]],[],null,["# ui.DateSlider\n\n\u003cbr /\u003e\n\nA draggable target that ranges linearly between two dates. The date slider can be configured to display dates of various interval sizes, including day, 8-day, and year. The value of the slider is displayed as a label alongside it.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|---------------------------------------------------------------------------------------------------------|---------------|\n| `ui.DateSlider(`*start* `, `*end* `, `*value* `, `*period* `, `*onChange* `, `*disabled* `, `*style*`)` | ui.DateSlider |\n\n| Argument | Type | Details |\n|------------|--------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `start` | Date\\|Number\\|String, optional | The start date, as a UTC timestamp, date string, or ee.Date. Defaults to one week ago. |\n| `end` | Date\\|Number\\|String, optional | The end date, as a UTC timestamp, date string, or ee.Date. Defaults to today. |\n| `value` | Date\\|Number\\|String, optional | The initial value. The value is an array consisting of the start and end date for the selected date range, but for convenience, it can be set by specifying the start date alone. Defaults to yesterday. |\n| `period` | Number, optional | The interval size for values on the slider in days. Defaults to one. |\n| `onChange` | Function, optional | A callback to fire when the slider's state changes. The callback is passed an ee.DateRange representing the slider's current value and the slider widget. |\n| `disabled` | Boolean, optional | Whether the slider is disabled. Defaults to false. |\n| `style` | Object, optional | An object of allowed CSS styles with their values to be set for this widget. Defaults to an empty object. |"]]