![]() |
MATLAB app builder helps in building apps in GUI without having proper software development knowledge. Matlab helps you create professional apps hassle-free, using it. There are so many components available in Matlab App Builder. You can find them all under the Component Library dialog box. This is situated in the leftmost part of the app builder window. DatePicker:To get started working on DatePicker, drag it from the component library and drop it in the design view. DataPicker component in MATLAB App Building helps users pick data from an interactive calendar. You can display dates in many different formats using this component. When you select a date picker component the uidatepicker function is get created, which controls the input of date from the user. The function is editable and you set some days off, i.e., which could not be picked and also some dates could be disabled. We will discuss all these in detail, but let’s get started with how to start working on a DatePicker component. Step 1:Start the Matlab App Builder, by either going to Design Apps,>Apps, or Create App>New>Home. Home and Apps menus are situated on the Menu Bar. Step 2: A popup will appear which would ask you to select your preferred layout. Go with a blank layout. Step 3: Select Date Picker from the Component Library, which is situated on the leftmost part of the screen. Drag it and drop it on the Design View(workspace), of the App. On importing the date picker following properties, defining the DatePicker would be added to our code. % Properties that correspond to app components properties (Access = public) % For creating the app figure UIFigure matlab.ui.Figure % For creating the Date Picker DatePicker matlab.ui.control.DatePicker % It is pre imported for label for date picker. % You can also remove it. DatePickerLabel matlab.ui.control.Label end Step 4: After importing it to our app, there would be a list of properties available for DatePicker. You can customize Date Picker’s properties from the Component Browser, which is situated in the rightmost part of the workspace. Let’s discuss each and every one of them in detail. Date Picker properties:
Let’s see an example for creating a date picker that selects dates till the 1st Jan 2050 where weekends are disabled. Also, change the color of the picker. For the required output follow these steps.
Example 1: Matlab
Output: Now take another example and design a date picker that takes the input of only those people who are born before 2000 and after 1950. Example 2: Matlab
Output: |
Reffered: https://www.geeksforgeeks.org
Geeks Premier League |
Related |
---|
![]() |
![]() |
![]() |
![]() |
![]() |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 8 |