Class DateTimePicker
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
তারিখ সময় চয়নকারী একটি ইনপুট ক্ষেত্র যা ব্যবহারকারীদের একটি তারিখ এবং সময় ইনপুট করতে দেয়।
ফর্ম জমার বৈধতা সমর্থন করে. যখন Action.setAllWidgetsAreRequired(allWidgetsAreRequired)
true
সেট করা হয় বা এই উইজেটটি Action.addRequiredWidget(requiredWidget)
এর মাধ্যমে নির্দিষ্ট করা হয়, একটি মান নির্বাচন না করা পর্যন্ত জমা দেওয়ার ক্রিয়াটি অবরুদ্ধ করা হয়৷
Google Workspace অ্যাড-অন এবং Google Chat অ্যাপের জন্য উপলভ্য।
const dateTimePicker =
CardService.newDateTimePicker()
.setTitle('Enter the date and time.')
.setFieldName('date_time_field')
// Set default value as Jan 1, 2018, 3:00 AM UTC. Either a number or
// string is acceptable.
.setValueInMsSinceEpoch(1514775600)
// EDT time is 5 hours behind UTC.
.setTimeZoneOffsetInMins(-5 * 60)
.setOnChangeAction(
CardService.newAction().setFunctionName('handleDateTimeChange'),
);
বিস্তারিত ডকুমেন্টেশন
set Field Name(fieldName)
ফিল্ডের নাম সেট করে যা ইভেন্ট অবজেক্টে এই বাছাইকারীকে সনাক্ত করে যা একটি UI ইন্টারঅ্যাকশনের সময় তৈরি হয়। ক্ষেত্রের নাম ব্যবহারকারীর কাছে দৃশ্যমান। প্রয়োজনীয়; নির্দিষ্ট ক্ষেত্রের নাম অনন্য হতে হবে।
পরামিতি
নাম | টাইপ | বর্ণনা |
---|
field Name | String | এই ইনপুটে বরাদ্দ করার নাম। |
প্রত্যাবর্তন
Date Time Picker
— এই পিকার, চেইন করার জন্য।
set On Change Action(action)
একটি Action
সেট করে যা স্ক্রিপ্টটি সম্পাদন করে যখনই পিকার ইনপুট পরিবর্তন হয়।
পরামিতি
নাম | টাইপ | বর্ণনা |
---|
action | Action | পদক্ষেপ নিতে হবে। |
প্রত্যাবর্তন
Date Time Picker
— এই পিকার, চেইন করার জন্য।
set Time Zone Offset In Mins(timeZoneOffsetMins)
UTC থেকে টাইম জোন অফসেট করা উচিত এমন মিনিটের সংখ্যা সেট করে। যদি সেট করা থাকে, তারিখ এবং সময় নির্দিষ্ট সময় অঞ্চলে প্রদর্শিত হয়। সেট না থাকলে, সময়টি ব্যবহারকারীর সময় অঞ্চলে প্রদর্শিত হয়।
পরামিতি
নাম | টাইপ | বর্ণনা |
---|
time Zone Offset Mins | Integer | UTC থেকে টাইম জোন অফসেট করা মিনিটের সংখ্যা৷ |
প্রত্যাবর্তন
Date Time Picker
— এই পিকার, চেইন করার জন্য।
set Title(title)
ইনপুট ক্ষেত্রের উপরে প্রদর্শিত শিরোনাম সেট করে।
পরামিতি
নাম | টাইপ | বর্ণনা |
---|
title | String | ইনপুট ক্ষেত্রের শিরোনাম। |
প্রত্যাবর্তন
Date Time Picker
— এই পিকার, চেইন করার জন্য।
set Value In Ms Since Epoch(valueMsEpoch)
ইনপুট ক্ষেত্রে সেট করা প্রিফিল করা মান সেট করে।
পরামিতি
নাম | টাইপ | বর্ণনা |
---|
value Ms Epoch | Number | ডিফল্ট মানটি একটি সংখ্যা হিসাবে ইনপুটে রাখা হয়েছে, যুগের পর থেকে মিলিসেকেন্ডে। এটি সর্বদা ফর্ম কলব্যাক প্যারামিটারে একটি স্ট্রিং হিসাবে উপস্থাপিত হয়। |
প্রত্যাবর্তন
Date Time Picker
— এই পিকার, চেইন করার জন্য।
set Value In Ms Since Epoch(valueMsEpoch)
ইনপুট ক্ষেত্রে সেট করা প্রিফিল করা মান সেট করে।
পরামিতি
নাম | টাইপ | বর্ণনা |
---|
value Ms Epoch | String | ডিফল্ট মানটি একটি স্ট্রিং হিসাবে ইনপুটে রাখা হয়েছে, যুগ থেকে মিলিসেকেন্ডে। এটি সর্বদা ফর্ম কলব্যাক প্যারামিটারে একটি স্ট্রিং হিসাবে উপস্থাপিত হয়। |
প্রত্যাবর্তন
Date Time Picker
— এই পিকার, চেইন করার জন্য।
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-24 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-07-24 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eDateTimePicker is an input field that allows users to input both a date and a time within Google Workspace Add-ons and Google Chat apps.\u003c/p\u003e\n"],["\u003cp\u003eIt provides functionalities to set a title, a default value, and a specific time zone for the date and time selection.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can set a field name for identifying the picker in events, and trigger custom actions when the input changes using \u003ccode\u003esetOnChangeAction()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe prefilled value can be set using milliseconds since the epoch, represented as either a number or a string.\u003c/p\u003e\n"]]],[],null,["# Class DateTimePicker\n\nDateTimePicker\n\nAn input field that allows users to input a date and time.\n\nSupports form submission validation. When [Action.setAllWidgetsAreRequired(allWidgetsAreRequired)](/apps-script/reference/card-service/action#setAllWidgetsAreRequired(Boolean)) is set to\n`true` or this widget is specified through [Action.addRequiredWidget(requiredWidget)](/apps-script/reference/card-service/action#addRequiredWidget(String)), the submission\naction is blocked unless a value is selected.\n\nAvailable for Google Workspace add-ons and Google Chat apps.\n\n```javascript\nconst dateTimePicker =\n CardService.newDateTimePicker()\n .setTitle('Enter the date and time.')\n .setFieldName('date_time_field')\n // Set default value as Jan 1, 2018, 3:00 AM UTC. Either a number or\n // string is acceptable.\n .setValueInMsSinceEpoch(1514775600)\n // EDT time is 5 hours behind UTC.\n .setTimeZoneOffsetInMins(-5 * 60)\n .setOnChangeAction(\n CardService.newAction().setFunctionName('handleDateTimeChange'),\n );\n``` \n\n### Methods\n\n| Method | Return type | Brief description |\n|----------------------------------------------------------------------------------|---------------------|--------------------------------------------------------------------------------------------------------------------------|\n| [setFieldName(fieldName)](#setFieldName(String)) | [DateTimePicker](#) | Sets the field name that identifies this picker in the event object that is generated when there is a UI interaction. |\n| [setOnChangeAction(action)](#setOnChangeAction(Action)) | [DateTimePicker](#) | Sets an [Action](/apps-script/reference/card-service/action) that the script performs whenever the picker input changes. |\n| [setTimeZoneOffsetInMins(timeZoneOffsetMins)](#setTimeZoneOffsetInMins(Integer)) | [DateTimePicker](#) | Sets the number of minutes that the time zone should be offset from UTC. |\n| [setTitle(title)](#setTitle(String)) | [DateTimePicker](#) | Sets the title displayed above the input field. |\n| [setValueInMsSinceEpoch(valueMsEpoch)](#setValueInMsSinceEpoch(Number)) | [DateTimePicker](#) | Sets the prefilled value to be set in the input field. |\n| [setValueInMsSinceEpoch(valueMsEpoch)](#setValueInMsSinceEpoch(String)) | [DateTimePicker](#) | Sets the prefilled value to be set in the input field. |\n\nDetailed documentation\n----------------------\n\n### `set``Field``Name(fieldName)`\n\nSets the field name that identifies this picker in the event object that is generated when\nthere is a UI interaction. The field name is visible to the user. Required; the specified field\nname must be unique.\n\n#### Parameters\n\n| Name | Type | Description |\n|---------------|----------|-----------------------------------|\n| `field``Name` | `String` | The name to assign to this input. |\n\n#### Return\n\n\n[DateTimePicker](#) --- This picker, for chaining.\n\n*** ** * ** ***\n\n### `set``On``Change``Action(action)`\n\nSets an [Action](/apps-script/reference/card-service/action) that the script performs whenever the picker input changes.\n\n#### Parameters\n\n| Name | Type | Description |\n|----------|------------------------------------------------------|---------------------|\n| `action` | [Action](/apps-script/reference/card-service/action) | The action to take. |\n\n#### Return\n\n\n[DateTimePicker](#) --- This picker, for chaining.\n\n*** ** * ** ***\n\n### `set``Time``Zone``Offset``In``Mins(timeZoneOffsetMins)`\n\nSets the number of minutes that the time zone should be offset from UTC. If set, the date and\ntime is displayed in the specified time zone. If not set, the time is displayed in the user's\ntime zone.\n\n#### Parameters\n\n| Name | Type | Description |\n|----------------------------|-----------|--------------------------------------------------------------|\n| `time``Zone``Offset``Mins` | `Integer` | The number of minutes that the time zone is offset from UTC. |\n\n#### Return\n\n\n[DateTimePicker](#) --- This picker, for chaining.\n\n*** ** * ** ***\n\n### `set``Title(title)`\n\nSets the title displayed above the input field.\n\n#### Parameters\n\n| Name | Type | Description |\n|---------|----------|------------------------|\n| `title` | `String` | The input field title. |\n\n#### Return\n\n\n[DateTimePicker](#) --- This picker, for chaining.\n\n*** ** * ** ***\n\n### `set``Value``In``Ms``Since``Epoch(valueMsEpoch)`\n\nSets the prefilled value to be set in the input field.\n\n#### Parameters\n\n| Name | Type | Description |\n|--------------------|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `value``Ms``Epoch` | `Number` | The default value placed in the input as a number, in milliseconds since the epoch. It is always represented as a string in the form callback parameters. |\n\n#### Return\n\n\n[DateTimePicker](#) --- This picker, for chaining.\n\n*** ** * ** ***\n\n### `set``Value``In``Ms``Since``Epoch(valueMsEpoch)`\n\nSets the prefilled value to be set in the input field.\n\n#### Parameters\n\n| Name | Type | Description |\n|--------------------|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `value``Ms``Epoch` | `String` | The default value placed in the input as a string, in milliseconds since the epoch. It is always represented as a string in the form callback parameters. |\n\n#### Return\n\n\n[DateTimePicker](#) --- This picker, for chaining."]]