Comments (4)
Hi @ShamiqTheDev, you are on the right track, but the localTime.date
is only the date. You'll want to use timeAfter/timeBefore/timeBetween to work with time.
from ui-extensions.
@ShamiqTheDev These operations refer to time as in the shop's timezone. The documentation for localTime says
localTime (LocalTime!)
Information about the current time relative to the shop's timezone setting.
The highlighted line in your query above will return true if, at the time of running the customization function, the local time in UAE is between midnight and 16:00.
from ui-extensions.
Hi @jamesvidler,
I am using
uaeShippingToday :timeBetween(startTime: "00:00:00", endTime: "15:59:59")
,
can you please confirm the time zone it uses? the store is in UAE timezone.
Also, can you confirm if I am using it the right way, like startTime 12 am
and endTime 4 pm
UAE time?
from ui-extensions.
@k3rni Thank you so much for the clarification. I am developing the extension on my development store where the timezone was not set properly, hence confused me, I discovered I must set the store's local time zone from shop settings, after which my doubt was cleared out and I was able to write my logic properly.
Thanks everyone for the support here.
from ui-extensions.
Related Issues (20)
- Checkout extensions Stepper manual input validation in real-time
- [Checkout UI - React] Can't use Switch component on customer-account surface HOT 3
- POS UI Extensions Cart lineItems have stopped being returned correctly (possibly as of 9.16.0) HOT 3
- API to identify which App Blocks are (or aren't) installed
- Colored labels in POS UI Extension lists
- [Checkout UI React] Shipping methods are re-selected when adding or removing cart lines HOT 1
- Remove customValidator from FormattedTextField starting from version 2025-01
- POS UI extensions seriously broken in the latest iOS Shopify POS version HOT 24
- `useStorage` inconsistency between live and test stores in `@shopify/ui-extensions-react/checkout` HOT 1
- useSelectedPaymentOptions Payment method name (as available in script editor and payment functions)
- Map component incorrect zoom behaviour HOT 4
- Admin resourcePicker `multiple` option doesn't work if `variants` filter is set to false
- Payment Options sample code is in opposite order to API definitions
- POS UI Extensions - allow multiple sequential api.cart actions without surfacing red error banner HOT 2
- Checkout UI, Customer Account UI, Link component open confirmation alert in editor
- Add ability to add a fee to checkout without using a product
- Feature Request: Add Customer Tags to `useCustomer` Hook in Checkout UI API
- `ConsentPhoneField` props not working as documented
- Featured Request: Add order status (fulfilled or not) to Order Api (customer-account-ui)
- customer-account: ImageGroup extra blank space
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ui-extensions.