Date selection methods, devices, media, and products

CN120469756BActive Publication Date: 2026-10-09GUANGZHOU BAOLUN ELECTRONICS CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510538056.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-27
Publication Date
2026-10-09
Estimated Expiration
2045-04-27

AI Technical Summary

Technical Problem

[0004]本申请实施例提供了一种日期选择方法、设备、介质及产品,可以解决现有日期选择方式操作繁琐且效率低下的问题

Benefits of technology

[0028] The date selection method provided in this application obtains a date selection request. The date selection request is triggered by a date selection object, which is generated based on at least one pre-selected date. If it is determined that the date selection request is triggered by a date selection object, the target date corresponding to the date selection object is selected and displayed. The embodiments of this application can quickly select a date from a pre-generated date selection object without the need for date searching and manual selection. The operation is simple, efficient, and effectively improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120469756B_ABST
    Figure CN120469756B_ABST
Patent Text Reader

Abstract

The application provides a date selection method, device, medium and product, and relates to the technical field of date setting. The method comprises the following steps: obtaining a date selection request, the trigger mode of the date selection request comprises date selection object-based triggering, and the date selection object is generated based on at least one preselected date; if it is determined that the date selection request is triggered on the date selection object, a target date corresponding to the date selection object is selected and displayed, the date selection object can be pre-generated to quickly select a date, date searching and manual selection are not needed, the operation is simple, the efficiency is high, and the use experience is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of date setting technology, and more specifically, to a date selection method, apparatus, medium, and product. Background Technology

[0002] In modern software development, date selection functionality is a common feature in user interfaces, especially in scenarios where users need to input or select dates, such as calendar applications, task management systems, and report generation tools.

[0003] Existing date selection methods typically require users to search for the desired date on the date display interface, and then select a single date with a single click or multiple dates by clicking one by one. This process is cumbersome and inefficient. Summary of the Invention

[0004] This application provides a date selection method, device, medium, and product that solves the problems of cumbersome operation and low efficiency in existing date selection methods. To achieve this objective, this application provides the following solutions.

[0005] According to one aspect of the embodiments of this application, a date selection method is provided, including:

[0006] Obtain a date selection request, wherein the date selection request is triggered by a date selection object, the date selection object being generated based on at least one pre-selected date;

[0007] If it is determined that the date selection request is triggered by the date selection object, then the target date corresponding to the date selection object is selected and displayed.

[0008] In one possible implementation, the generation of the date selection object includes:

[0009] Obtain selection information for time range rules and date selection rules, and generate the date selection object based on the selection information.

[0010] In one possible implementation, selecting and displaying the target date corresponding to the date selection object includes:

[0011] Obtain the time range rules and date selection rules corresponding to the date selection object;

[0012] The date range is determined according to the time range rule, and the date within the date range that corresponds to the date selection rule is determined as the target date corresponding to the date selection object.

[0013] In one possible implementation, obtaining the selection information for the time range rule and the date selection rule includes:

[0014] The time range rules and the date selection rules are displayed, and the display objects corresponding to the time range rules and the date selection rules are different;

[0015] The selection information for the time range rules and the date selection rules can be obtained through the display interface of the time range rules and the date selection rules.

[0016] In one possible implementation, the request to obtain a date selection includes:

[0017] The date selection interface is displayed, and the date selection object is displayed on one side of the date selection interface. The name of the date selection object is determined based on the target date corresponding to the date selection object.

[0018] A date selection request is obtained based on the trigger information of the date selection object.

[0019] In one possible implementation, the display of the target date includes:

[0020] The date is assigned to allSelectDates, and the target date is highlighted in the date interface based on allSelectDates.

[0021] In one possible implementation, determining the date range according to the time range rule and identifying the dates within the date range that correspond to the date selection rule as the target dates corresponding to the date selection object includes:

[0022] The start and end times of the date interval are determined according to the time range rules.

[0023] Based on the date selection rules, target dates that match the date selection rules are filtered from the date range.

[0024] According to one aspect of the embodiments of this application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of any of the methods described above.

[0025] According to one aspect of the embodiments of this application, the embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed, implements the steps of the method described above.

[0026] According to one aspect of the embodiments of this application, the embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the steps of the method described above.

[0027] The beneficial effects of the technical solutions provided in this application are:

[0028] The date selection method provided in this application obtains a date selection request. The date selection request is triggered by a date selection object, which is generated based on at least one pre-selected date. If it is determined that the date selection request is triggered by a date selection object, the target date corresponding to the date selection object is selected and displayed. The embodiments of this application can quickly select a date from a pre-generated date selection object without the need for date searching and manual selection. The operation is simple, efficient, and effectively improves the user experience. Attached Figure Description

[0029] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below.

[0030] Figure 1 A flowchart illustrating the date selection method provided in this application embodiment;

[0031] Figure 2 A schematic diagram illustrating date selection provided in an embodiment of this application;

[0032] Figure 3 This is a structural diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0033] The embodiments of this application are described below with reference to the accompanying drawings. It should be understood that the embodiments described below with reference to the accompanying drawings are exemplary descriptions for explaining the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions of the embodiments of this application.

[0034] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the terms “comprising” and “including” as used in embodiments of this application mean that the corresponding feature can be implemented as the presented feature, information, data, step, operation, element, and / or component, but do not exclude implementation as other features, information, data, step, operation, element, component, and / or combinations thereof supported by the art. It should be understood that when we say that an element is “connected” or “coupled” to another element, the one element can be directly connected or coupled to the other element, or it can mean that the one element and the other element establish a connection relationship through an intermediate element. Furthermore, “connected” or “coupled” as used herein can include wireless connection or wireless coupling. The term “and / or” as used herein indicates at least one of the items defined by the term; for example, “A and / or B” indicates implementation as “A,” or implementation as “A,” or implementation as “A and B.”

[0035] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0036] The technical solutions of this application and their effects are described below through several exemplary embodiments. It should be noted that the following embodiments can be referenced, borrowed from, or combined with each other. Identical terms, similar features, and similar implementation steps in different embodiments will not be repeated.

[0037] The date selection method, apparatus, medium, and product provided in this application are intended to solve at least one technical problem existing in the prior art.

[0038] Optionally, the device that performs the date selection method of this application can be a mobile phone, tablet computer, smartwatch, or other terminal capable of date selection.

[0039] Optionally, such as Figures 1-2 As shown, the date selection method of this application includes:

[0040] S101: Get date selection request.

[0041] Optionally, the date selection request can be triggered by the user clicking a button, clicking a specific icon with a mouse, or by voice input or detecting a specific action (such as an action that requires obtaining date information), or it can be a request to select a date based on a received instruction.

[0042] Optionally, the date selection request can be triggered based on a date selection object, which is generated based on at least one pre-selected date.

[0043] Optionally, the date selection object can be a shortcut key on the date display interface, triggering a date selection request by clicking the shortcut key. Specifically, the instruction to click the date selection object can be generated by touching the screen, clicking the mouse, or pressing a specific key.

[0044] Optionally, obtaining a date selection request includes: displaying a date interface, displaying a date selection object on one side of the date interface, and obtaining the date selection request based on the trigger information of the date selection object. The name of the date selection object is determined based on the target date corresponding to the date selection object.

[0045] In one embodiment, a date interface is displayed based on user instructions or actions, and the date selection object is displayed on the left side of the date interface as a shortcut key. Date information is displayed on the right side of the date interface; this date information can be the date of the current month, or it can display month information or date information for a single week or multiple weeks based on the user's action. If a user is detected clicking on a date selection object with the mouse, a date selection request is determined to have been received.

[0046] Optionally, a date selection request can be a user-input instruction to select one or more specified dates, or it can be a request generated by clicking a date on a date interface. After determining that the date selection request is not triggered by a date selection object, the date information in the date selection request is obtained, and the date corresponding to that date information is determined as the target date.

[0047] Optionally, the generation of the date selection object includes: obtaining selection information for time range rules and date selection rules, and generating the date selection object based on the selection information.

[0048] Optionally, the time range rules and date selection rules can be preset or generated based on user input requests. Users can input time range information according to their needs (such as a time range of XX year XX month), and the terminal uses this time range information to generate time range rules. Users can also input date selection rule information (such as whether the date is singular or plural, the date of a specific event, the calculation formula for date selection, etc.), and the terminal generates date selection rules after receiving this date selection rule information.

[0049] Optionally, obtaining selection information for time range rules and date selection rules includes: displaying the time range rules and date selection rules, where the display objects for the time range rules and date selection rules are different; and obtaining the selection information for the time range rules and date selection rules through their display interfaces. The display object can be a drop-down menu, or a corresponding small window, new page, or other display object.

[0050] In one embodiment, the time range rules and date selection rules can be displayed as a drop-down menu. Users can select the desired time range rules and date selection rules from the drop-down menu. After selecting a desired rule, if an instruction confirming the selection is received, a date selection object is generated based on the selected rule.

[0051] Optionally, the time range rule can be this month, this year, or other time ranges, and the date selection rule can be weekdays, weekends, Mondays, Tuesdays, Wednesdays, Thursdays, Fridays, or other date selection rules.

[0052] Optionally, if the displayed time range rule or date selection rule is not the rule the user needs, the user can also enter a command to add a rule. The terminal can then display a rule input interface based on the command and generate a new time range rule or date selection rule based on the rule information in the rule input interface.

[0053] In one embodiment, the time range rule represents the selected time range (such as "this month" or "this year"), with the default value being "this month". The date selection rule represents the selected rule type (such as "weekday", "weekend", "Monday", etc.), with the default value being "weekday". A date selection object can be generated by combining time range rules and date selection rules, or it can be generated by using either time range rules or date selection rules individually. When the user selects the rules to be combined (such as rule A and rule B) and clicks the "OK" button, the terminal, based on the instruction triggered by the button click, combines the currently selected rule A and rule B to generate a new shortcut key.

[0054] Example:

[0055] If rule A is "this month" and rule B is "Monday", then generate the shortcut key {label:"Monday of this month",value:{scope:"currentMonth",ruleType:"monday"}}.

[0056] Optionally, after generating the date selection objects, the allSelectDates database can be used to store a set of all selected dates. AllSelectDates then displays the date selection objects on the interface in a specific way (such as with specific colors or text) based on the stored date selection objects. Specifically, allSelectDates can store date selection objects using keyboard shortcuts, with each shortcut including its display name and corresponding rules.

[0057] Optionally, the name of the date picker can be a combination of the names of the rules included in the shortcut key, or it can be determined according to the naming instructions entered by the user. After selecting a date picker, it can also be displayed with a specific color or shape so that the user can quickly confirm the selected date picker.

[0058] S102: If it is determined that the date selection request is triggered by a date selection object, then select and display the target date corresponding to the date selection object.

[0059] Optionally, selecting and displaying the target date corresponding to the date selection object includes: obtaining the time range rule and date selection rule corresponding to the date selection object; determining the date interval according to the time range rule; and determining the date within the date interval that corresponds to the date selection rule as the target date corresponding to the date selection object.

[0060] Optionally, when the date selection object only includes time range rules, a date range can be obtained based on the time range rules, all dates corresponding to that date range can be used to determine the target date, and the target date can be displayed on the current screen. When the date selection object only includes date selection rules, the currently displayed dates can be obtained, dates matching the date selection rules can be filtered from these dates, and those dates can be determined as the target date and highlighted.

[0061] Optionally, the date range is determined according to the time range rules, and the dates within the date range that correspond to the date selection rules are determined as the target dates corresponding to the date selection objects, including: determining the start and end times of the date range according to the time range rules; and filtering out the target dates that match the date selection rules from the date range based on the date selection rules.

[0062] In one embodiment, information about the time range rule and the date selection rule is obtained based on the date selection object. If the date range corresponding to the time range rule is "this month", then the date range is from the first day to the last day of the current month.

[0063] startDate = new Date(today.getFullYear(), today.getMonth(), 1); / / First day of this month

[0064] endDate = new Date(today.getFullYear(), today.getMonth()+1, 0); / / Last day of the month

[0065] If the date range is "this year", then the date range is from the first day to the last day of the current year:

[0066] startDate = new Date(today.getFullYear(), 0, 1); / / First day of the year

[0067] endDate = new Date(today.getFullYear(), 11, 31); / / Last day of the year

[0068] For date selection rules, if the date selection rule is "Monday", then iterate through the date range and filter out all Mondays.

[0069] If the date selection rule is "weekdays", then iterate through the date range and filter out all dates from Monday to Friday.

[0070] If the date selection rule is "weekend", then iterate through the date range and filter out all Saturday and Sunday dates.

[0071] If the date selection rule is "Tuesday" to "Sunday", then iterate through the date range and filter out the corresponding days of the week.

[0072] The relevant code for retrieving the target date can be:

[0073]

[0074]

[0075] Optionally, displaying the target date includes: assigning the date to allSelectDates, and highlighting the target date in the date interface based on allSelectDates. Specifically, the target date can be highlighted with a specific color (e.g., Figure 2 As shown, the target date is displayed in a font that is enclosed in a circle with a gray background.

[0076] The date selection method provided in this application has the following advantages:

[0077] Definition and implementation of keyboard shortcuts: This application introduces keyboard shortcuts to allow users to quickly select dates that conform to specific patterns, greatly improving the efficiency of date selection.

[0078] Customizable date selection rules: Users can choose the appropriate date selection rules according to their own needs to meet the requirements of different scenarios.

[0079] Automated date calculation: The component can automatically calculate and select dates that meet the conditions based on the rules selected by the user, reducing the number of steps required by the user.

[0080] Based on the same inventive concept, embodiments of this application provide an electronic device, such as... Figure 3 As shown, Figure 3 The illustrated electronic device 2000 includes a processor 2001 and a memory 2003. The processor 2001 and the memory 2003 are communicatively connected, for example, via a bus 2002.

[0081] Processor 2001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), a FPGA (Field-Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 2001 may also be a combination that implements computing functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.

[0082] Bus 2002 may include a pathway for transmitting information between the aforementioned components. Bus 2002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 2002 can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the figure, but this does not indicate that there is only one bus or one type of bus.

[0083] The memory 2003 may be ROM (Read-Only Memory) or other types of static storage devices capable of storing static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices capable of storing information and instructions, or EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read-Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto.

[0084] Optionally, the electronic device 2000 may also include a communication unit 2004. The communication unit 2004 can be used for receiving and transmitting signals. The communication unit 2004 allows the electronic device 2000 to communicate wirelessly or wiredly with other devices to exchange data. It should be noted that in practical applications, the communication unit 2004 is not limited to one.

[0085] Optionally, the electronic device 2000 may further include an input unit 2005. The input unit 2005 can be used to receive input numbers, characters, images, and / or sound information, or to generate key signal inputs related to user settings and function control of the electronic device 2000. The input unit 2005 may include, but is not limited to, one or more of the following: a touchscreen, a physical keyboard, function keys (such as volume control buttons, power buttons, etc.), a trackball, a mouse, a joystick, a camera, a microphone, etc.

[0086] Optionally, the electronic device 2000 may also include an output unit 2006. The output unit 2006 can be used to output or display information processed by the processor 2001. The output unit 2006 may include, but is not limited to, one or more of a display device, a speaker, a vibration device, etc.

[0087] Although the electronic device 2000 with various devices is shown in the figure, it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.

[0088] Optionally, the memory 2003 is used to store a computer program for executing the scheme of this application, and its execution is controlled by the processor 2001. The processor 2001 is used to execute the computer program stored in the memory 2003 to implement the steps of any method provided in the embodiments of this application.

[0089] Based on the same inventive concept, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by an electronic device / processor, implements the steps of any method provided in this application or the steps of various optional implementations of the method provided in this application.

[0090] Based on the same inventive concept, embodiments of this application provide a computer program product, which includes a computer program that, when executed by an electronic device / processor, implements the steps of any method provided in this application or the steps of various optional implementations of the method provided in this application.

[0091] Those skilled in the art will understand that the steps, measures, and solutions in the various operations, methods, and processes discussed in this application can be alternated, modified, combined, or deleted. Furthermore, other steps, measures, and solutions in the various operations, methods, and processes discussed in this application can also be alternated, modified, rearranged, decomposed, combined, or deleted. Furthermore, steps, measures, and solutions in related technologies that are similar to those disclosed in this application can also be alternated, modified, rearranged, decomposed, combined, or deleted.

[0092] In the description of this application, the terms "center," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicate directions or positional relationships based on the exemplary directions or positional relationships shown in the accompanying drawings. They are used to facilitate the description or simplification of the embodiments of this application and are not intended to indicate or imply that the device or component referred to must have a specific orientation or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application.

[0093] The terms "first," "second," "third," "fourth," "1," "2," etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in a sequence other than that shown in the figures or text.

[0094] It should be understood that although arrows indicate various operation steps in the flowcharts of this application's embodiments, the order in which these steps are implemented is not limited to the order indicated by the arrows. Unless explicitly stated herein, in some implementation scenarios of this application's embodiments, the implementation steps in each flowchart can be executed in other orders as required. Furthermore, some or all steps in each flowchart, based on the actual implementation scenario, may include multiple sub-steps or multiple stages. Some or all of these sub-steps or stages can be executed at the same time, and each sub-step or stage can also be executed at different times. In scenarios where execution times differ, the execution order of these sub-steps or stages can be flexibly configured according to requirements, and this application's embodiments do not limit this.

[0095] The above description is only an optional implementation method for some implementation scenarios of this application. It should be noted that for those skilled in the art, other similar implementation methods based on the technical concept of this application without departing from the technical concept of this application also fall within the protection scope of the embodiments of this application.

Claims

1. A date selection method, characterized in that, include: Obtain a date selection request, wherein the date selection request is triggered by a date selection object, the date selection object being generated based on at least one pre-selected date; If it is determined that the date selection request is triggered by the date selection object, then the target date corresponding to the date selection object is selected and displayed; The generation of the date selection object includes: Obtain selection information for time range rules and date selection rules, generate the date selection object based on the selection information, store the set of all selected dates using the data allSelectDates, and store the date selection object through shortcut keys in allSelectDates. Each shortcut key includes the display name of the shortcut key and the corresponding rule of the shortcut key.

2. The date selection method according to claim 1, characterized in that, The step of selecting and displaying the target date corresponding to the date selection object includes: Obtain the time range rules and date selection rules corresponding to the date selection object; The date range is determined according to the time range rule, and the date within the date range that corresponds to the date selection rule is determined as the target date corresponding to the date selection object.

3. The date selection method according to claim 1, characterized in that, The selection information for obtaining the time range rule and date selection rule includes: The time range rules and the date selection rules are displayed, and the display objects corresponding to the time range rules and the date selection rules are different; The selection information for the time range rules and the date selection rules can be obtained through the display interface of the time range rules and the date selection rules.

4. The date selection method according to claim 1, characterized in that, The request to obtain a date selection includes: The date selection interface is displayed, and the date selection object is displayed on one side of the date selection interface. The name of the date selection object is determined based on the target date corresponding to the date selection object. A date selection request is obtained based on the trigger information of the date selection object.

5. The date selection method according to claim 4, characterized in that, The display of the target date includes: The date is assigned to allSelectDates, and the target date is highlighted in the date interface based on allSelectDates.

6. The date selection method according to claim 2, characterized in that, The step of determining a date range according to the time range rule, and determining the dates within the date range that correspond to the date selection rule as the target dates corresponding to the date selection object, includes: The start and end times of the date interval are determined according to the time range rules. Based on the date selection rules, target dates that match the date selection rules are filtered from the date range.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method as described in any one of claims 1-6.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed, it implements the steps of the method as described in any one of claims 1-6.

9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-6.

Citation Information

Patent Citations

  • Date sequence generation method and device, equipment and storage medium

    CN115641104A