Regional settings time and date

Hello all,

I'm starting to get a little grumpy about it.
I really can't find anywhere how to get the times and dates in Dutch.
Can/should I set this globally somewhere in my APP, and if so how (this is my preference)?
Or do I have to set this for every calendar view ? and if so how?
Can someone help me out with that?
Help is much appreciated..


5 Replies

IR Indumathi Ravichandran Syncfusion Team August 9, 2023 05:37 AM UTC

Hi Marchel,


As per the shared information, we have checked and your requirement is “Setting the localization for Flutter Calendar”. We have a UG and KB documentation for the same. Please find the documentation from the following link.


UG link:

https://help.syncfusion.com/flutter/calendar/localization


KB link:

https://support.syncfusion.com/kb/article/11052/how-to-override-the-material-app-locale-and-set-english-language-for-flutter-calendar

https://support.syncfusion.com/kb/article/10830/how-to-override-the-localization-in-the-flutter-calendar


We hope that this helps you. If this is not your requirement could you please share your use case scenario with a pictorial representation? It would be helpful for us to analyze the feasible solution at our end.


Regards,

Indumathi R



MA Marchel August 12, 2023 07:45 AM UTC

Thank you for your response, but I have no idea how to make this in flutterflow.



IR Indumathi Ravichandran Syncfusion Team August 14, 2023 07:04 AM UTC

Hi Marchel,


Please find the steps for creating the project in FlutterFlow.


Steps:

  1. Create a project in FlutterFlow.

  2. Using the Custom code option add new widget and add the required code to run calendar.

  3. Add the WidgetName as class name of the project

  4. Then add the Pubspec dependencies.

  5. Then using UI Builder option drag and drop implemented widget in the display area.


Also please find the documentation link for adding custom widget in FlutterFlow.


https://docs.flutterflow.io/customizing-your-app/custom-functions/custom-widgets#2.-create-custom-widget


Please find the code and screenshot for FlutterFlow.


// Automatic FlutterFlow imports

import '/flutter_flow/flutter_flow_theme.dart';

import '/flutter_flow/flutter_flow_util.dart';

import '/custom_code/widgets/index.dart'; // Imports other custom widgets

import '/flutter_flow/custom_functions.dart'; // Imports custom functions

import 'package:flutter/material.dart';

// Begin custom widget code

// DO NOT REMOVE OR MODIFY THE CODE ABOVE!

 

import 'package:syncfusion_flutter_calendar/calendar.dart';

 

import 'package:flutter_localizations/flutter_localizations.dart';

 

// Set your widget name, define your parameter, and then add the

// boilerplate code using the button on the right!

 

class SyncfusionCalendarWidget extends StatefulWidget {

  const SyncfusionCalendarWidget({

    Key? key,

    this.width,

    this.height,

  }) : super(key: key);

 

  final double? width;

 

  final double? height;

 

  @override

  _SyncfusionCalendarWidgetState createState() =>

      _SyncfusionCalendarWidgetState();

}

 

class _SyncfusionCalendarWidgetState extends State<SyncfusionCalendarWidget> {

  @override

  Widget build(BuildContext context) {

    return MaterialApp(

        debugShowCheckedModeBanner: false,

        localizationsDelegates: [

          GlobalMaterialLocalizations.delegate,

        ],

        supportedLocales: [

          Locale('en'),

          Locale('et'),

          Locale('nl'),

        ],

        locale: Locale('nl'),

        home: Container(

          width: widget.width,

          height: widget.height,

          child: SfCalendar(

            view: CalendarView.week,

          ),

        ));

  }

}


Screenshot from FlutterFlow:



We hope that this helps you. Please let us know if you need further assistance.


Regards,

Indumathi R



MA Marchel August 14, 2023 10:05 AM UTC

You are amazing, thank you for the support!!

.



KM Karthick Mani Syncfusion Team August 15, 2023 05:35 AM UTC

Hi Marchel,

We're pleased that your issue is resolved! Please let us know if you need further assistance. We're always happy to help you out.


Regards,
Karthick M.


Loader.
Up arrow icon